How do I skip DDL statements?

2024-10-10 08:05:52  Updated

This topic describes how to skip specified DDL statements in the JDBCWriter component.

Applicable versions

OceanBase Migration Service (OMS) V3.2.2 and later

Procedure

  1. Find the DDL statements received on the source end.

    1. Log on to the OMS console.

    2. In the left-side navigation pane, click Data Migration.

    3. On the Data Migration page, click the name of the target data migration task to go to its details page.

    4. Click View Component Monitoring in the upper-right corner.

    5. In the View Component Monitoring dialog box, click the More icon after JDBCWriter and choose View Logs from the context menu.

    6. Click the msg/ddl_msg.log tab and copy the DDL statement that follows the colon after the receive ddl keyword. The statement is received from the source.

      ddl_msg

  2. Update the configurations of the JDBCWriter component.

    1. Return to the View Component Monitoring dialog box.

    2. Click Update in the Actions column of the JDBCWriter component.

    3. In the Update Configurations dialog box, hover the pointer over the blank area next to the root parameter and click the add icon that appears.

    4. Enter JDBCWriter.coordinatorFile.skipDdl for Key Name and click the check icon.

    5. In the Update Configurations dialog box, find the new key name. The default value is NULL.

    6. Hover the pointer over the new parameter, click the edit icon that appears, and change the value of the parameter to the DDL statement that follows the colon after the receive ddl keyword and that you copied in the foregoing step.

      DROP TABLE IF EXISTS `t_alter****` /* generated by server */
      

      If you want to skip multiple DDL statements, separate them with a dollar sign (&), for example:

      DROP TABLE IF EXISTS `t_alter****` /* generated by server */&DROP TABLE IF EXISTS `t1_alter****`
      
  3. Restart the JDBCWriter component.

Contact Us