Mapping Object Names

Data synchronization allows you to synchronize objects (including databases, schemas and tables) in a sources database to the corresponding objects in a destination database. If the synchronization objects in source and destination databases have different names, you can map the source object name to the destination one. The mapping types include database, schema, and table.

Object name mapping can be used only in the following scenarios:

  • For the first time you select synchronization objects for a data synchronization task.
  • For the first time you add or delete the synchronization object which is not in a mapping relationship.

This section describes how to map objects when configuring a data synchronization task. For details about the mapping relationship, see Viewing Synchronization Mapping Information.

Mapping Databases

Currently, you can map different database names only for synchronization from MySQL to MySQL and MySQL to PostgreSQL. For example, when synchronizing database A in the source database to database B in the destination database you need to map database name first.

  1. On the Set Synchronization Task page, select the database that needs to be mapped from the synchronization objects on the right area and click Edit.

    Figure 1 Mapping databases

  2. Changing a database name

    In the displayed dialog box, enter a new database name. The new database name is the name of the database saved in the destination database.

    Figure 2 Changing a database name

  3. Check the result.

    After the database name is changed, the database name before modification and the new database name are displayed. The database mapping is complete.
    Figure 3 Checking the result

Mapping Schemas

A schema is a collection of database objects, including: tables, views, stored procedures, and indexes.

Currently, you can map different schema names only for synchronization from MySQL to PostgreSQL. For example, you need to synchronize schema A in the source database to schema B in the destination database.

  1. On the Set Synchronization Task page, select the schema that needs to be mapped from the synchronization objects on the right area and click Edit.

    Figure 4 Mapping schemas

  2. Edit the schema name.

    In the displayed dialog box, enter a new schema name which is the name to be saved in the destination database.

    Figure 5 Edit Schema Name

  3. Check the result.

    After the schema name is changed, the schema name before modification and the new schema name are displayed. The schema mapping is complete.
    Figure 6 Checking the result

Mapping Tables

Currently, you can map different table names only for synchronization from MySQL to PostgreSQL. For example, when synchronizing table A in the source database to table B in the destination database you need to map table names first.

  1. On the Set Synchronization Task page, select the table that needs to be mapped from the synchronization objects on the right area and click Edit.

    Figure 7 Table name mapping

  2. Change a table name.

    In the displayed dialog box, enter a new table name. The new table name is the name of the table saved in the destination database.

    Figure 8 Changing a table name

  3. Check the result.

    After the table name is changed, the table name before modification and the new table name are displayed. The table mapping is complete.
    Figure 9 Checking the result