DataWorks provides a visual way to import data into AnalyticDB for MySQL. It requires less setup than external tables and works well for small-volume data transfers. This topic walks you through importing data from PolarDB-X (formerly DRDS) to AnalyticDB for MySQL using a DataWorks Data Integration sync task.
How it works
A DataWorks sync task is built from three components that you configure in sequence:
| Component | Role |
|---|---|
| Reader | Connects to the source database (PolarDB-X) and reads data |
| Writer | Connects to the destination database (AnalyticDB for MySQL) and writes data |
| Sync job | Orchestrates the reader and writer — defines scheduling, field mappings, and execution |
Configure the reader and writer first, then create the sync job that ties them together.
Prerequisites
Before you begin, ensure that you have:
Configured the source (PolarDB-X) and destination (AnalyticDB for MySQL) databases in Data Source Management in DataWorks. See Data source list for supported sources, and Data Source Management for configuration steps.
For the full list of sources supported by batch synchronization and their configurations, see Supported data sources and synchronization solutions.
Purchased a resource group with a suitable specification and attached it to the workspace. Depending on your setup, use either a Serverless resource group or an exclusive resource group for Data Integration.
Established a network connection between the resource group and the data source. See Configure network connections.
Import data from PolarDB-X to AnalyticDB for MySQL
Step 1: Configure the reader
Set up the DRDS Reader to connect DataWorks to your PolarDB-X source database. The reader defines which data to extract and how to read it.
For configuration details, see DRDS Reader.
Step 2: Configure the writer
Set up the AnalyticDB for MySQL 3.0 Writer to connect DataWorks to your destination database. The writer defines how extracted data is written to AnalyticDB for MySQL.
For configuration details, see AnalyticDB for MySQL 3.0 Writer.
Step 3: Create and run the sync job
Use the Codeless UI to create a batch synchronization node that connects the reader and writer. In the Codeless UI, you map source fields to destination fields and configure the execution schedule.
For configuration details, see Codeless UI configuration.