This topic describes the background information, limitations, and procedure for synchronization objects.
Background information
When you create a data synchronization task, you must specify the synchronization objects. To do so, OceanBase Migration Service (OMS) Community Edition allows you to specify the names of synchronization objects, import synchronization objects by using a CSV file, and specify synchronization object match rules. If you set the synchronization object selection mode to Match Rules for a synchronization task, you can specify the synchronization objects by configuring wildcard rules and specify the object-mapping logic between the source and destination data sources. This feature makes it easier to migrate a great number of objects based on simple and efficient string-matching rules. If a new table in the source data source meets the matching rules, the DDL statement that created the table can be automatically synchronized to the destination database.
Limitations
OMS Community Edition allows you to specify multiple rules. Each rule occupies a single row, and spaces are not allowed before or after a rule.
Object synchronization rules are required and object exclusion rules are optional.
OMS Community Edition does not support DDL modifications during schema synchronization or full synchronization.
When you set the synchronization object selection mode to Match Rules, OMS Community Edition does not support table names that contain special characters. Special characters are line breaks, spaces, and | " ' ` ( ) = ; / & * ?[ ]
Considerations
After you configure the object synchronization rule and the object exclusion rule, if the name of a source table exists in the difference set between the object synchronization rule and the object exclusion rule, the related objects can be selected.
Note
A difference set between two sets contains all elements that exist in one set but do not exist in the other set.
After you enable the DDL synchronization feature, when you use a DDL statement to create a new table or modify a table schema in the source database, if the table name or table schema name is within the difference set between the synchronization object rule and the object exclusion rule, the DDL statement is synchronized to the destination database in real time by OMS Community Edition.
Procedure
Create a data migration task and configure it to the Select Synchronization Type step.
For more information, see the topic about creating a data synchronization task between the corresponding data sources in the Data synchronization chapter.
On the Select Objects page, select the synchronization objects and synchronization scope.
You can select Specify Objects or Match Rules to specify the synchronization rules. This section describes how to configure a matching rule.
Select Match Rules.
In the Specify Synchronization Scope section, specify object synchronization rules in the Object Migration Rule field and object exclusion rules in the Object Exclusion Rule field. The Object Exclusion Rule field is optional. For more information, see Wildcard rules.
Click Verify.
In the Map Object to Topic dialog box, select a mapping method.
Click OK.
To view the matching results, click Preview Objects after the verification succeeds. The wildcard rules and exclusion rules apply to tables and views. The matching results are displayed on the Final Objects, New Objects, and Removed Objects tabs.
Tab Description Final Objects Displays the synchronization objects that are hit by the specified matching rules. New Objects Displays the synchronization objects that are not in the result of the previous matching. Removed Objects Displays the synchronization objects that are only in the result of the previous matching. Complete subsequent task settings as prompted.