This topic describes how to configure the destination database for an extract, transform, and load (ETL) task.
Prerequisites
An ETL task is created in one of the following regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Shenzhen), China (Guangzhou), and China (Hong Kong).
The destination database belongs to one of the following types:MySQL, PolarDB for MySQL, Oracle, AnalyticDB for MySQL V3.0, PolarDB for PostgreSQL, PostgreSQL, Db2 for LUW, iSeries DB2 (AS/400), AnalyticDB for PostgreSQL, SQL Server, MariaDB, PolarDB-X 1.0, PolarDB for Oracle, and Tablestore.
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
In this example, a MySQL database is used.
Go to the Streaming ETL page.
Log on to the Data Management (DMS) console.
In the top navigation bar, move your pointer over DTS.
Choose .
In the upper-left corner of the Streaming ETL page, click. 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.
Configure the source database. For more information, see Configure a source database.
Configure the transformation component. For more information, see Configure transformation components.
On the left side of the canvas, drag the Output MySQL node to the canvas on the right side of the page. The Output MySQL node is named Output MySQL-1.
Move the pointer over the transformation component and click the dot to draw a line between the transformation component and the Output MySQL-1 node.
Click the Output MySQL-1 node on the canvas to configure the destination database.
On the Node Settings tab, configure the parameters.
Parameter
Description
Data Source Name
DTS automatically generates a data source name. We recommend that you specify a descriptive name for easy identification. You do not need to use a unique name.
Region
The region in which the destination database resides.
Instances
The name of the destination database instance. You can also click Create Instance below the Instances field to create a destination database instance. For more information, see Databases supported by DMS.
Table Mapping
The transformed table to be stored in the destination database.
In the Select Destination Table section, select the destination table.
On the Field Mapping tab, select the column names based on your business requirements and configure the related parameters.
Result
If the icon is not displayed on the right side of the Output MySQL-1 node, the destination database is configured.