When configuring a data migration task, migration data filtering is used to filter data records in the table object of the source . With the filtering, you can extract records that fulfill specified conditions. This is applicable for scenarios such as regular incremental data replication and table splitting.
This section introduces how to configure SQL Where clauses for filtering migration data during migration task creation.
SQL filtering clauses only apply to existing data migration; it does not affect the incremental data.
The SQL filtering function can be called during the Migration object and type configuration stage, within the creation of a migration task. It is used for specific table objects rather than database objects.
The operation procedure is as follows:
Select the table object to be migrated from the Migration objects box, and add it to the Selected objects box.
Click Edit under the newly added table object that you want to configure SQL filtering clauses.
Note: The Edit button appears when the mouse is over the specific object in the Selected objects box.
On the Edit table page, enter the SQL Where clause in the Filtering condition block, and click Verify syntax.
The SQL Where clause follows the standard database SQL Where syntax, supporting calculation and simple functions. For example, to migrate records whose ID number is greater than 1000, fill in the clause:
Click OK to complete.
After the SQL filtering configuration, the data migration task will only migrate tables with records that fulfill the specified conditions.