All Products
Search
Document Center

Data Transmission Service:Enable\ multi\-table\ merge

Last Updated:Mar 28, 2026

When you replicate data to AnalyticDB, source databases are often sharded across multiple tables that share the same schema—for example, orders_2023, orders_2024, and orders_2025. The multi-table merging feature lets you consolidate these tables into a single destination table during migration or synchronization, so you can query all data from one place without post-load transformation.

The feature is available for data migration and synchronization tasks where the destination is an AnalyticDB for MySQL V3.0 or AnalyticDB for PostgreSQL instance.

Limitations

  • Incompatible with data verification. If a task has the data verification feature enabled, you cannot enable multi-table merging for that task.

  • DDL operations are not replicated for incremental tasks. When multi-table merging is enabled on an incremental data migration or synchronization task, DTS (Data Transmission Service) does not replicate DDL operations from the source. If you perform DDL operations on the source database, data loss occurs in the destination or the task fails.

Prerequisites

Before you begin, ensure that you have:

  • A data migration or synchronization task that uses an AnalyticDB for MySQL V3.0 or AnalyticDB for PostgreSQL instance as the destination database

  • The task open at the Configure Objects and Advanced Settings step in the configuration wizard

For help creating a synchronization task, see Overview of data synchronization scenarios. For migration tasks, see Overview of data migration scenarios.

Enable multi-table merging

The following steps use a data synchronization task as an example.

  1. In the Configure Objects and Advanced Settings step, configure all parameters above Merge Tables.

  2. Set Merge Tables to Yes.

  3. (Optional) Decide whether to enable the __dts_data_source tag column. The __dts_data_source column is a custom tag column added to the merged destination table. It records which source table each row originated from, which is useful when you need to trace data back to its source after merging.

    Note

    You can configure the column name and tag values only after the task is purchased.

    SettingEffect
    YesDTS adds the __dts_data_source column to the destination table. You must assign a unique tag value per source table in a later step.
    NoDTS does not add the column. Source traceability is not available.
  4. In the Source Objects section, select the tables to merge, then click 向右小箭头 to move them to the Selected Objects section.

  5. In the Selected Objects section, right-click a table and choose Edit Table Name. In the dialog box, set Table Name to the name of the destination table. To merge multiple source tables into one destination table, assign all of them the same Table Name value. The following example shows how three source tables map to a single destination table:

    Source tableTable Name (destination)
    orders_2023orders
    orders_2024orders
    orders_2025orders

    Edit Table Name

  6. Repeat the previous step for all tables you want to merge.

    Important

    All source tables to be merged must share the same Table Name value.

    Merge tables

  7. Complete the remaining configuration steps following the on-screen instructions. If you set Set the value of __dts_data_source to Yes in step 3, go to the Configure Database and Table Fields step and enter a unique tag value in the Value of __dts_data_source column for each source table. The value of __dts_data_source column cannot be reused.

    Value of __dts_data_source column