You can use SQL-like queries to filter the source table to migrate only records that match certain conditions. For example, you can migrate records that were created within a time range or split a table into multiple smaller tables.


  1. Create a data migration task.
  2. In the Configure Migration Types and Objects step, select the required objects into the Selected list, move the pointer over a database or table, and then click Edit next to the object.Select a table
  3. In the Filter text area, enter a filter expression.
    • For relational databases, such as MySQL and SQL Server, use a SQL condition.Enter an SQL condition
      • The filter expression follows the syntax of the WHERE clause of most SQL languages. Do not include WHERE in the filter expression. The following operators are supported: =, ! =, <, and >. For example, orderid>100.
      • You can use apostrophes (') around object names for clearer delimitation. For example, address in('sandiego','tokyo').
    • For NoSQL databases, such as MongoDB, sue a JSON-formatted condition.
      Note You can specify a JSON-formatted condition. For example, enter {"id":{$gt:"52b64e55dc4449b7ba3d1183a0ea171b"}} to migrate only records with an ID greater than this value.
  4. Click Verify to verify that the specified expression is valid.
    • If the syntax is valid, you receive an Information message that the validation is passed.
    • If the syntax is invalid, you receive an Error message that indicates the error in your expression. In this case, correct the filter expression and verify it again.
  5. Click OK.
  6. Complete other configurations and continue to create a task.