All Products
Search
Document Center

ApsaraDB for OceanBase:Configure DDL/DML synchronization

Last Updated:Nov 29, 2024

This topic describes how to configure DDL synchronization and DML synchronization for incremental synchronization in a data migration or synchronization task.

Background

If you select Incremental Synchronization in the Select Migration Type or Select Synchronization Type step of a data migration or synchronization task, DML synchronization is supported by default. You can configure DML synchronization or DDL synchronization.

  • DML Synchronization: When you configure a data migration or synchronization task, you can specify a synchronization strategy for the DML SQL statements to be synchronized. Only those meeting the specified conditions will be synchronized to the destination. DML filtering applies to scenarios of migrating historical tables and transaction details tables.

  • DDL Synchronization: You can choose whether to synchronize DDL operations when you configure a data migration or synchronization task. DDL operations, such as CREATE TABLE, ALTER TABLE, DROP TABLE, and TRUNCATE TABLE, are synchronized to the destination only after you enable DDL synchronization. The DDL synchronization feature applies to long-term data migration and synchronization tasks to significantly lower the O&M costs.

Limitations

  • DML synchronization

    • DML filtering takes effect for the entire data migration or synchronization task.

    • Full data verification is not supported for a data migration task for which DML filtering is configured.

  • DDL synchronization

    • Only DDL operations that are listed in the preceding section are supported.

    • If a table to be synchronized involves unsupported DDL operations, the data migration or synchronization task may be interrupted and unrecoverable data exceptions may arise.

    • Do not perform DDL operations for database or table schema changes in the schema migration/synchronization or full data migration/synchronization phase. Otherwise, the data migration or synchronization task may be interrupted.

Procedure

  1. Configure a data migration or synchronization task as prompted to the Select Migration Type or Select Synchronization Type step.

    For more information, see the topics about data migration or data synchronization tasks of the corresponding data source types.

    image.png

  2. On the Select Migration Type or Select Synchronization Type page, select Incremental Synchronization. DML Synchronization is selected by default.

    image

  3. Click Custom configuration DDL/DML.

  4. In the Custom configuration DDL/DML dialog box, select the DML or DDL operations to be synchronized.

    • DML operations INSERT, DELETE, and UPDATE are supported for synchronization. You can perform DML filtering as needed. For more information about the DDL operations that can be synchronized for different types of data migration or synchronization tasks, see Supported DDL operations for synchronization. You can select DDL operations as needed.

      image

    • When you migrate data from a Lindorm or HBase database to OBKV, DML operations DELETE and PUT are supported for synchronization. If you want to select DML Synchronization in Incremental Synchronization, contact Alibaba Cloud Technical Support to confirm that the data delivered to Kafka is ordered. Otherwise, the data in the source and destination databases may be inconsistent.

      For more information about the configuration for delivering data from Lindorm to Kafka, see Limitations in Overview. For more information about ApsaraDB for HBase Performance-enhanced Edition, see Features.

      image

  5. In the Custom configuration DDL/DML dialog box, click OK.

  6. On the Select Migration Type or Select Synchronization Type page, click Next and complete subsequent task settings as prompted.