DTS provides the object name mapping feature. You can use this feature to change the name of an object in the destination instance. This topic describes how to use the object name mapping feature when you configure a data migration task.

Limits

  • While configuring a data migration task, you can use the object name mapping feature when you go to the step of Configure Migration Types and Objects.
    Note Don't use the object name mapping feature once a data migration task started. Otherwise, the migration might fail.
  • MongoDB supports only database name mapping and table name mapping.

Non-batch mappings of databases, tables, and columns

  1. In the Configure Migration Types and Objects step, move the target objects to the Selected section, move the pointer over a database or table, and then click Edit.
    Note You can use the object name mapping feature only on objects that are supported by DTS.
    Click Edit
  2. In the dialog box that appears, specify a name for the object in the destination instance.
    Note
    • DDL and DML statement filtering functions are also supported when performing database or table name mapping, when the source and destination database are user-create MySQL, ApsaraDB RDS for MySQL, or ApsaraDB PolarDB for MySQL. You can select DDL or DML statements that need to be synchronized according to business requirements.
    • If the selected statements of the database name mapping and table name mapping are different, the statement selected during table name mapping shall prevail.
    • Database name mapping

      In the Edit Database Name dialog box that appears, enter the database name that you want to use in the destination instance.

      Enter the database name
    • Table name mapping

      In the Edit Table dialog box that appears, enter the table name that you want to use in the destination instance.

      Enter the table name
    • Column name mapping

      In the Edit Table dialog box that appears, enter a new name for each column.

      Specify column names
      Note In this step, you can clear the options of columns that do not need to be synchronized.
  3. Click OK.
  4. Configure other parameters that are required for the data migration task.

Batch mappings of tables, and columns

  1. In the Configure Migration Types and Objects step, move the target objects to the Selected section.
    Notice If the granularity of the last selected object to be migrated is database, the Name batch change Option is not selectable.
  2. At the bottom of the page, click Yes, and then click the Advanced Settings.Batch Name Mapping
  3. In the Advanced Settings page, batch map table and column names as needed.
    1. Select the choice range on your requirements. In this case, Select Section.
      Notice If you select Section ,you can enter the database name or table name keyword to filter the databases or tables to be mapped.
    2. Select a rule and configure the rule details as required.
    3. Click Add Modification Rules.
      Notice You can repeat steps i and ii to configure different rules for different tables.
    4. Click Preview to check whether the rules you set meet expectations.Preview of bulk table name mapping results
    5. In the Partial Preview tab, click the Down Arrow icon at the end of the database name listed in Destination Database box ,and then click Column Name Modification.
    6. Configure mapping rules for column names as required. After the configuration, click OK. Batch column name mapping
      Notice
      • The default rule applies to all columns, you can enter a keyword of the column name, and then click Search to filter the columns whose names are mapped.
      • In the dialog box, you can also configure filters to filter the data to be migrated. For more information, see filter configuration.
    7. Click OK.
  4. Click Precheck.
  5. Configure other parameters that are required for the data migration task.