Data Integration is a reliable, secure, cost-effective, elastic, and scalable data synchronization platform provided by Alibaba Cloud. It supports data storage across heterogeneous systems and offers offline (both full and incremental) data access channels in diverse network environments for more than 20 types of data sources. For more information, visit Supported data source types, Reader plug-ins, and Writer plug-ins.
Scenarios
- Export data from AnalyticDB for PostgreSQL to other data sources and process the data as needed.
- Import processed data from other data sources to AnalyticDB for PostgreSQL.
In both the preceding scenarios, you can execute a synchronization task in Data Integration. For more information about how to create and configure a synchronization task including the data source and whitelist, visit the DataWorks documentation. The following sections detail how to import data to and export data from AnalyticDB for PostgreSQL.
Preparations
Complete the following preparations for Data Integration:
- Register an Alibaba Cloud account.
- Activate MaxCompute. After a default MaxCompute data source is generated, log on to the DataWorks console by using your Alibaba Cloud account.
- Create a workspace. In the workspace, you can complete your workflow and maintain both your data and tasks.
Complete the following preparations for AnalyticDB for PostgreSQL:
- If you want to import data, use the psql CLI client to create both the destination database and table on your AnalyticDB for PostgreSQL instance.
- If you want to export data, configure an IP address whitelist for your AnalyticDB for PostgreSQL instance. For more information, visit Add whitelist.
Import data
Add a data source in the DataWorks console. For more information, visit Configure data sources.
Configure a synchronization task.
The synchronization task is used to synchronize data from a data source to AnalyticDB for PostgreSQL. You can configure the synchronization task in wizard or script mode.
- To configure a synchronization task in wizard mode, follow these steps:
- Create a data synchronization node.
- Specify a data source.
- Specify a data destination. This must your AnalyticDB for PostgreSQL instance.
- Configure the mappings between fields from the source and destination tables.
- Specify a maximum transmission rate and dirty data check rules.
- Configure scheduling attributes.
Note For more information, visit Configure a synchronization task in wizard mode. - To configure a synchronization task in script mode, follow these steps:
- Create a data synchronization node.
- Import a template.
- Configure a reader for the synchronization task.
- Configure a writer for the synchronization task. The writer must be your AnalyticDB for PostgreSQL instance.
- Configure the mappings between fields from the source and destination tables.
- Specify a maximum transmission rate and dirty data check rules.
- Configure scheduling attributes.
Note For more information, visit Configure a synchronization task in script mode.
Export data
The data export procedure is similar to the data import procedure, except that you must specify AnalyticDB for PostgreSQL as the data source. For more information, visit Add an AnalyticDB for PostgreSQL connection.
References
For more information, visit the DataWorks documentation.