This topic describes the application scenarios, limits, and procedure of data filtering by using SQL conditions after you select the synchronization objects when you create a data synchronization project.
Scenarios
When you create a data synchronization project, you can specify SQL conditions to filter data. Only the data that meets the filter conditions will be synchronized to the destination database. This feature allows you to filter data in multiple scenarios, such as scheduled data synchronization or migration, data table sharding, and historical and dirty data filtering.
Limits
An SQL condition filters only fields of the current table. Cross-table filtering is not supported.
SQL conditions are supported in full synchronization and incremental synchronization.
Procedure
Create a data migration project and configure it to the Select Synchronization Objects step.
For more information, see the topic about creating a data synchronization project between the corresponding data sources in the Data synchronization chapter.
Select the synchronization object, and then hover the pointer over the target object in the Destination Objects list on the right of the Specify Synchronization Scope section.
Click Settings.

In the Settings dialog box, specify a standard SQL
WHEREclause to filter data by row.
Click Validate Syntax.

Click OK.
Complete subsequent project settings as prompted.