This topic describes how to view and modify the synchronization objects of a configured data synchronization task as well as their SQL filter conditions by using the data transmission service.
Background
You can add or remove synchronization objects and modify their filter conditions during synchronization under the specified limitations. The changes made are recorded. When an object addition task is completed, it is integrated with the associated original task. When the integration is completed, the original task runs normally and the object addition task is automatically released.
Limitations
For a data synchronization task in the Not Started, Running, or Paused state, you can add or remove its synchronization objects.
ImportantFor a data synchronization task in the Paused state, if the Incremental Synchronization step of the task is also in the Paused state, you cannot add its synchronization objects.
For a data synchronization task in the Failed state, you cannot add its synchronization objects.
For a data synchronization task in the Modifying or Integrating state, you cannot modify its synchronization objects again.
When the Incremental Synchronization step of a data synchronization task is in the Paused or Failed state, you cannot add its synchronization objects.
For a data synchronization task in the Paused, Failed, Not Started, or Running state, you can modify its row filter conditions.
View synchronization objects
Log on to the ApsaraDB for OceanBase console.
In the left-side navigation pane, choose Data Transmission > Data Synchronization.
On the Data Synchronization page, click the name of the target task to go to its details page.
Click View Objects in the upper-right corner and view information on the Synchronization Objects and Object Modifications tabs.
The Synchronization Objects tab displays the synchronization objects of the current task. You can click Add Objects or
Remove Objects to add or remove objects and modify their row filter conditions.The Object Modifications tab displays the types, status, and occurrence time of all object modifications.
Add synchronization objects
On the details page of the target task, click View Objects in the upper-right corner.
In the View Objects dialog box, choose Synchronization Objects > Add Objects.
In the Add Objects dialog box, select the synchronization objects to add.
ImportantBy default, the newly added synchronization objects inherit all configuration options of the original data synchronization task. If you abort the object addition operation, you must manually delete the objects that have been added to the destination database.
If you have specified a schema name or database name for the source data source, you can add only the synchronization objects under the specified schema name or database name.
If the destination of the data synchronization task is a message queue, in the Add Objects dialog box, select synchronization objects in the left-side Source Object section and click > to add them to the right-side list. In the Map Object to Topic dialog box, select a mapping method as needed.
After you select the synchronization objects to add, you can perform operations such as changing the topic, setting row filters, and removing objects.
If the destination of the data synchronization task is a database, in the Add Objects dialog box, select synchronization objects in the left-side Source Object section and click > to add them to the right-side list.
After you select the synchronization objects to add, you can perform operations such as renaming destination objects, setting row filters, and removing objects.
Click Next.
The system automatically performs a precheck on the added synchronization objects. After the added synchronization objects pass all check items, click Save.
Confirm the information and click OK in the dialog box that appears.
For a paused or failed data synchronization task, you can cancel the operation and modify the synchronization objects again. The added synchronization objects will be migrated to the destination database only after the data synchronization task returns to normal.
If you add synchronization objects for a running data synchronization task, after you click
Save , the added synchronization objects are immediately synchronized to the destination database.
When an object addition operation begins, the corresponding record is generated. To view the details of the record, click View Objects on the details page of the task and then click the Object Modifications tab.
The status of an object addition record can be Pending, Canceled, Modifying, Running, Aborted, Integrating, Succeeded, or
Failed . The operations that you can perform on an object addition record and the status of the original data synchronization task vary with the status of the object addition record.NoteIf the original data synchronization task is in the Not Started state, a modification record in the Succeeded state is generated for an object addition operation. If the original data synchronization task is in the Paused state, a modification record in the Pending state is generated for an object addition operation.
The status of an object addition record changes only when the original data synchronization task is in the
Running state, and the status of the original task changes along with the status of the object addition record. The following table describes more information.Status of an object addition record
Supported operations
Status of the original task
Pending
View details and cancel the addition.
Running
Canceled
None
Running
Modifying
None
Modifying
Running
View details and abort the addition.
Modifying
Aborted
View details.
Running
Integrating
View details.
Integrating
Succeeded
View details.
Running
Failed
View details and retry the addition.
You can also click View Causes to go to the task details page and view the failure causes.
Modifying or Integrating
Remove synchronization objects
On the details page of the target task, click View Objects in the upper-right corner.
In the View Objects dialog box, choose Synchronization Objects > Remove Objects.
In the Remove Objects dialog box, hover over a synchronization object that you want to remove in the Target Object section on the right and click Remove.
If the destination of the data synchronization task is a message queue, you can select multiple synchronization objects and then click Batch Remove. In the dialog box that appears, click OK.
In the Remove Objects dialog box, click Remove.
In the confirmation dialog box that appears, confirm the synchronization object to remove and click OK.
If the task is in the
Paused ,Failed , orRunning state, after you clickOK , the synchronization object is immediately removed from the destination database.ImportantA removed synchronization object cannot be recovered. Proceed with caution.
The final result of the object removal operation is either succeeded or failed for all synchronization objects.
When an object removal operation begins, the corresponding record is generated. To view the details of the record, click View Objects on the details page of the task and then click the Object Modifications tab.
The status of an object removal record can be Pending, Canceled, Modifying, Succeeded, or
Failed . The operations that you can perform on an object removal record and the status of the original data synchronization task vary with the status of the object removal record.Status of an object removal record
Supported operations
Status of the original task
Pending
View details and cancel the removal.
Running
Canceled
None
Running
Modifying
View details.
Modifying
Succeeded
View details.
Running
Failed
View details and retry the removal.
You can also click View Causes to go to the task details page and view the failure causes.
Modifying
Modify the filter conditions for synchronization objects
You can modify the SQL conditions to filter data for synchronization objects selected by using the
On the details page of the target task, click View Objects in the upper-right corner.
In the View Objects dialog box, click the Synchronization Objects tab, expand the target schema, hover over the target object, and click Settings.
In the Row Filters section of the Settings dialog box, specify a standard SQL WHERE clause to configure or modify row filters. For more information, see Use SQL conditions to filter data.
Click Validate Syntax.
After the validation succeeds, click OK in the Settings dialog box.
In the dialog box that appears, click Apply to apply the modification to the object.
On the Object Modifications tab, view the modification progress.
You can also click View Details to go to the Modify Setting Details page, hover over the target data table, and click View Settings to view the modified row filters.