Data Transmission Service (DTS) adds additional columns to the tables that are synchronized to DataHub and MaxCompute. These additional columns are used to manage metadata, sort data, and remove duplicates. If the names of additional columns are the same as the names of existing columns in the destination table, data synchronization fails. To avoid this issue, we recommend that you modify the naming rules for additional columns.

Background information

Before you modify the naming rules for additional columns, check whether the names of the additional columns are the same as those of existing columns in the destination table. The following table lists the previous and new naming rules for additional columns.

Important If you use the previous naming rules for additional columns, DTS automatically adds the dts_ prefix to the original columns that are synchronized from the source database in the destination database. If you use the new naming rules for additional columns, DTS does not add prefixes to the original columns that are synchronized from the source database in the destination database.
Table 1. Naming rules for additional columns
Destination instancePrevious additional column nameNew additional column nameReference
DataHub
  • dts_record_id
  • dts_instance_id
  • dts_db_name
  • dts_table_name
  • dts_operation_flag
  • dts_utc_timestamp
  • dts_before_flag
  • dts_after_flag
  • new_dts_sync_dts_record_id
  • new_dts_sync_dts_instance_id
  • new_dts_sync_dts_db_name
  • new_dts_sync_dts_table_name
  • new_dts_sync_dts_operation_flag
  • new_dts_sync_dts_utc_timestamp
  • new_dts_sync_dts_before_flag
  • new_dts_sync_dts_after_flag
Schema of a DataHub topic
MaxCompute
  • record_id
  • operation_flag
  • utc_timestamp
  • before_flag
  • after_flag
  • modifytime_year
  • modifytime_month
  • modifytime_day
  • modifytime_hour
  • modifytime_minute
  • new_dts_sync_record_id
  • new_dts_sync_operation_flag
  • new_dts_sync_utc_timestamp
  • new_dts_sync_before_flag
  • new_dts_sync_after_flag
  • new_dts_sync_modifytime_year
  • new_dts_sync_modifytime_month
  • new_dts_sync_modifytime_day
  • new_dts_sync_modifytime_hour
  • new_dts_sync_modifytime_minute
Schema of an incremental data table

Procedure

  1. Create and configure a data synchronization task. For more information, see Steps 1 to 7 in Configure a data synchronization task.
  2. In the Select Object to Be Synchronized step, specify Whether to enable new additional column rules.
    Modify the naming rules for additional columns
    SectionDescription
    YesIf you select Yes, the new naming rules for additional columns are used.
    Note If the previous names of additional columns are the same as the names of existing columns in the destination table, select Yes.

    DTS adds the new_dts_sync_ prefix to the previous names of additional columns.

    For example, if the previous name of an additional column is record_id, the new name of the additional column is new_dts_sync_record_id.

    NoIf you select No, the previous naming rules for additional columns are used.
    Note For more information about the naming rules for additional columns, see Naming rules for additional columns.
  3. Configure other parameters that are required for the data synchronization task.

References