If an AnalyticDB for MySQL V3.0 instance or an AnalyticDB for PostgreSQL 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 or an AnalyticDB for PostgreSQL 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.
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.
Select Yes for the Merge Tables parameter.
Optional:Select No for the Set the value of __dts_data_source parameter.
NoteThe name and values of the custom tag column can be configured only after purchase.
Select one or more tables from the Source Objects section. Click the icon to add the tables to the Selected Objects section.
In the Selected Objects section, right-click a table to be synchronized. In the Edit Table Name dialog box, set the Table Name parameter.
NoteThe 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.
Repeat the preceding step to set the Table Name parameter for all the tables to be synchronized.
ImportantTo merge the tables to be synchronized, you must specify the same name for these tables.
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.
NoteThe value of __dts_data_source column cannot be reused.