All Products
Search
Document Center

ApsaraDB for OceanBase:Rename a migration object

Last Updated:Jun 05, 2024

This topic describes how to use the migration or synchronization object renaming feature provided by the data transmission service.

Scenarios

By default, migration or synchronization objects, such as databases and tables, have the same names in the source and destination. You can rename a migration or synchronization object in the destination to map the database and table names between the source and the destination. 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 Distribute Relational Database Service (DRDS) and MyCat data sources to the same table in the destination.

Limitations

  • The data transmission service allows you to rename migration or synchronization objects only when you select migration or synchronization objects for a data migration or synchronization project.

  • Do not rename objects after the data migration or synchronization project is started.

Directly rename a specified object

After you select migration or synchronization objects by using the Specify Objects option, you can rename the objects by performing the following operations.

  1. Configure the data migration or synchronization project to the Select Migration Objects or Select Synchronization Objects step.

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

    image.png

  2. After you manually specify the database objects to be migrated or synchronized, move the pointer over the table object that you want to rename in the Destination Object list on the right of the Specify Migration Scope or Specify Synchronization Scope section, and click Rename.

    image.png

  3. Rename the object in the destination in the text box.

    image.png

  4. Click OK to view the new object name.

    image.png

  5. Complete subsequent project settings as prompted.

Rename an object by using a matching rule

After you select migration or synchronization objects by using the Match Rules option, you can rename an object by performing the following operations.

    Important

    After you rename an object in the destination by using a matching rule on the left, you cannot rename this object again on the right.

    The row filter conditions and other settings remain the same after an object is renamed by using a matching rule.

  1. Configure the data migration or synchronization project to the Select Migration Objects or Select Synchronization Objects step.

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

  2. After you choose Match Rules and specify the database objects to be migrated or synchronized, enter a matching rule with new object names in the Specify Migration Scope section.

    In the Object Migration Rule section, clear the mappings between the source and destination objects by using an equal sign (=), and then rename the objects. For example, if the source database name is test and the table name is test1, you can enter test.test1=a.b to change the source database name to a and the table name to b.

    image.png

  3. Click Verify.

  4. After the verification is passed, click Preview Object to view the new database name and table name.

  5. Complete subsequent project settings as prompted.