If an AnalyticDB for MySQL V3.0 instance, an AnalyticDB for PostgreSQL instance, or a Tablestore instance serves as the destination database of a data migration or synchronization task in Data Transmission Service (DTS), you can enable the multi-table merging feature. This feature allows you to merge multiple tables that share the same schema in the source database into one table in the destination database.

Prerequisites

A data migration or synchronization task is created and the task is in the Configure Objects and Advanced Settings stage. In this task, an AnalyticDB for MySQL V3.0 instance, an AnalyticDB for PostgreSQL instance, or a Tablestore instance is used as the destination database. For more information about how to configure a data migration or synchronization task, see Overview of data synchronization scenarios or Overview of data migration scenarios.

Usage notes

  • You cannot enable the multi-table merging feature for a task that enables the data verification feature.
  • If you enable the multi-table merging feature for an incremental data migration or synchronization task, DDL operations are not supported to be migrated or synchronized. If you perform DDL operations on the source database, data loss occurs in the destination database or the task fails.

Procedure

In this example, the multi-table merging feature is enabled for a data synchronization task in DTS.

  1. Go to the Configure Objects and Advanced Settings step in the configuration wizard for the data synchronization task that you created. Set all the parameters above the Merge Tables parameter.
  2. Select Yes for the Merge Tables parameter.
  3. Optional:Select No for the Set the value of __dts_data_source parameter.
    Note The name and values of the custom tag column can be configured only after purchase.
  4. Select one or more tables from the Source Objects section. Click the Rightwards arrow icon to add the tables to the Selected Objects section.
  5. In the Selected Objects section, right-click a table to be synchronized. In the Edit Table Name dialog box, set the Table Name parameter.
    Note The Table Name parameter specifies the name to be used by the table in the destination database.
    Specify the same value for the Table Name parameter. Edit Table Name
  6. Repeat the preceding step to set the Table Name parameter for all the tables to be synchronized.
    Important To merge the tables to be synchronized, you must specify the same name for these tables.
    Merge tables
  7. Complete the subsequent configurations of the task based on the on-screen instructions and references.

    If you select Yes for the Set the value of __dts_data_source parameter in Step 3, you must enter values in the Value of __dts_data_source column in the Configure Database and Table Fields step.

    Note The value of __dts_data_source column cannot be reused.
    Value of __dts_data_source column