This topic describes how to configure the destination database for an extract, transform, and load (ETL) task.

Prerequisites

  • An ETL task is created in the China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Shenzhen), or China (Guangzhou) region.
  • The destination database belongs to one of the following types: self-managed MySQL databases, ApsaraDB RDS for MySQL, PolarDB for MySQL, AnalyticDB for MySQL V3.0, self-managed Oracle databases, self-managed PostgreSQL databases, ApsaraDB RDS for PostgreSQL, Db2 for LUW, Db2 for i, and PolarDB for PostgreSQL.
  • The destination database is created.
  • The source database and the transformation component are configured.
  • The schemas of tables in the destination database are created. This is because the ETL feature does not support schema migration. For example, Table A contains Field 1, Field 2, and Field 3, and Table B contains Field 3, Field 4, and Field 5. If you need to join Table A and Table B into a table that contains Field 1, Field 2, Field 3, Field 4, and Field 5, you must create Table C in the destination database. Table C contains Field 1, Field 2, Field 3, Field 4, and Field 5.

Procedure

Note In this example, a self-managed MySQL database is used.
  1. Go to the ETL page.
    Note

    You can also perform the following steps to configure an ETL task in the Data Management (DMS) console:

    • Go to the DMS console.
    • In the top navigation bar, click DTS. Then, in the left-side navigation pane, choose Data integration > Streaming ETL.
    • Click Create Data Flow. In the Create Data Flow dialog box, specify an ETL task name in the Data Flow Name field and set the Development Method parameter to DAG.
    • Click OK.
  2. In the upper-left corner of the page, select the region where you create the ETL task.
    Note You can create an ETL task only in the China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Shenzhen), and China (Guangzhou) regions. Select a region based on your needs.
  3. In the left-side navigation pane, click ETL.
  4. On the ETL page, click Create Task (Pay-as-you-go).
  5. Configure the source database. For more information, see Configure source databases.
  6. Configure the transformation component. For more information, see Configure transformation components.
  7. Move the pointer over the destination database, and click the dot to draw a line between the destination database and the transformation component.
  8. In the Output section on the left side of the page, select MySQL and drag it to the canvas on the right side of the page.
  9. Click MySQL on the canvas.
  10. In the Output MySQL section, set the required parameters.
    1. On the Configure Nodes tab, set the required parameters.
      Destination Database_Configure Nodes
      Parameter Description
      Data Source Name DTS automatically generates a data source name. We recommend that you specify a descriptive name that makes it easy to identify. You do not need to use a unique name.
      Region Select the region where the destination database resides.
      Database Connection Template Select the name of the template that stores the connection settings of the destination database. You can also click Create Template to create a connection template. For more information, see Create a connection template.
      Note For more information about how to create a connection template in the Data Management (DMS) console, see Create a connection template.
      Table Mapping Select the table to be stored in the destination database.

      In the Select Destination Table section, click the destination table.

    2. On the Field Mapping tab, select the column names based on your needs and set the related parameters.
      Destination Database_Field Mapping

Result

After the destination database is configured, the Configured icon appears on the right side of the destination database.