This topic describes how to add a prefix to the names of the destination tables when you migrate multiple tables to the cloud at a time.

Prerequisites

The required data sources are added. For more information, see Supported data stores.

Procedure

  1. Log on to the DataWorks console. In the left-side navigation pane, click Workspaces. On the Workspaces page, find the desired workspace and click Data Integration in the Actions column.
    If you are using a service of DataWorks, click the icon in the upper-left corner and choose All Products > Data Integration to go to the Data Integration page.
  2. On the Data Integration page, click Sync Tables in the left-side navigation pane.
  3. On the Sync Nodes page, click Sync Tables in the upper-right corner. On the Sync Tables page, select the data sources that you want to migrate and the destination MaxCompute data source.
  4. In the Configure Sync Rules step, click Add Rule.

    Rule 1: Use the built-in variable ${db_table_name_src_transed} to add a prefix to the names of the destination tables based on the Target Table Name Prefix rule

    In this example, the built-in variable ${db_table_name_src} is used to add the prefix AAA_ to the names of the destination tables. Add a prefix to the names of the destination tables

    Rule 2: Use a regular expression to add a prefix to the names of the destination tables based on the Change Table Names rule

    In this example, (.+) is used to match source table names, and ods_$1 is used to add the prefix ods_ to the table names. Add a prefix to the names of the destination tables
  5. Click Apply Rules. After the rule is applied, you can view the converted table names in the Select Tables step.
  6. In the Select Tables step, select the tables that you want to migrate and click Commit.