This topic describes how to rename a migration or synchronization object in OceanBase Migration Service (OMS).
Scenarios
By default, migration or synchronization objects, such as databases and tables, have the same names in the source and target databases. You can rename a migration or synchronization object in the target database to map the object names between the source and target databases. The renaming feature applies to multi-table aggregation scenarios and scenarios where the object names in the test and production environments are inconsistent.
Note
The multi-table aggregation feature is mainly used to synchronize data from multiple tables in Distribute Relational Database Service (DRDS) and MyCat data sources to the same table in the target database.
Limitations
OMS allows you to rename a migration or synchronization object only in the step of selecting migration or synchronization objects when you configure a data migration or synchronization task.
Do not rename an object after the data migration or synchronization task is started.
In a data synchronization task, you can rename a specific object only when you synchronize data from an OceanBase Database Proxy (ODP) logical table to a physical table in a MySQL-compatible tenant of OceanBase Database, or from an IDB logical table to a MySQL-compatible tenant of OceanBase Database.
Directly rename a specific object
When you select migration or synchronization objects by using the Specify Objects option, you can rename the objects by performing the following operations.
Configure a data migration or synchronization task to the Select Migration Objects or Select Synchronization Objects step.
For more information, see the topics about data migration or data synchronization tasks of the corresponding data source types.
After you manually specify the migration or synchronization objects, move the pointer over the object that you want to rename in the Target Object(s) list, and click Rename.
Rename the object in the target database in the text box.
Click OK to view the new object name.
Complete subsequent task settings as prompted.
Rename an object by using a matching rule
When you select migration objects by using the Match by Rule option, you can perform the following operations to rename an object:
Notice
You can rename only migration objects based on a matching rule.
After you rename an object in the target database by using a matching rule, you cannot rename this object again in the matching result. The row filter conditions and other settings remain the same after an object is renamed by using a matching rule.
Configure a data migration task to the Select Migration Objects step.
For more information, see the topics about data migration tasks of the corresponding data source types.
Select migration objects by using the Match by Rule option. Then, enter the renaming equation in the Object Migration Rule field in the Specify Migration Scope section. For example, if the source database name is
testand the source table name istest1, you can entertest.test1=a.bto change the database name toaand the table name tobin the target.Click Verify.
After the verification succeeds, click Preview Object to view the new database name and table name.
Complete subsequent task settings as prompted.
