All Products
Search
Document Center

Data Transmission Service:Migrate data from a PolarDB for MySQL cluster to a self-managed Doris database

Last Updated:Mar 28, 2026

Data Transmission Service (DTS) migrates data from a PolarDB for MySQL cluster to a self-managed Doris database, enabling large-scale analytics workloads on Doris. This topic walks through the setup using a Doris database deployed on an ECS instance as the destination.

To complete this migration:

  1. Grant the required permissions to database accounts.

  2. Create a DTS task and connect the source and destination databases.

  3. Select migration types and objects.

  4. Run a precheck, purchase a DTS instance, and start the migration.

Prerequisites

A destination Doris database is created. The available storage space of this database must be larger than the storage space used by the source PolarDB for MySQL cluster.

For more information about the supported versions of the source and destination databases, see Overview of migration solutions.

Permissions required for database accounts

The permissions required vary based on which migration types you select.

DatabaseSchema migrationFull data migrationIncremental data migration
Source PolarDB for MySQL clusterSELECTSELECTRead and write permissions
Destination Doris databaseUsage_priv, Select_priv, Load_priv, Alter_priv, Create_priv, Drop_priv(same)(same)

To create and authorize database accounts:

Billing

Migration typeLink configuration feesData transfer cost
Schema migration and full data migrationFreeFree, unless Access Method for the destination is set to Public IP Address. See Billing overview.
Incremental data migrationCharged. See Billing overview.

Supported SQL operations for incremental migration

Operation typeSQL statements
DMLINSERT, UPDATE, DELETE
DDLADD COLUMN, MODIFY COLUMN, CHANGE COLUMN, DROP COLUMN, DROP TABLE, TRUNCATE TABLE, RENAME TABLE
Important

RENAME TABLE operations may cause data inconsistency. If you select a table as the migration object and rename it during migration, that table's data is not migrated to the destination. To prevent this, select the database containing the table as the migration object, and make sure both the pre-rename and post-rename databases are included in the migration objects.

Constraints and limits

Review the following constraints before configuring your migration task.

Source database limits

  • Outbound bandwidth: the server hosting the source database must have enough outbound bandwidth. Insufficient bandwidth reduces migration speed.

  • Table requirements:

    • Tables with primary keys or UNIQUE constraints: make sure table fields are unique to avoid duplicate data in the destination.

    • Tables without primary keys or UNIQUE constraints: when configuring the task, select Schema Migration under Migration Types, then set Engine to duplicate for these tables in the Configurations for Databases, Tables, and Columns step. Otherwise, the task may fail or data may be lost.

  • Column mapping limit: if you map column names or perform per-column edits, a single task can migrate a maximum of 1,000 tables. To exceed this limit, split the tables across multiple tasks or migrate the entire database without per-column edits.

  • Incremental migration only:

    • Enable binary logging and set loose_polar_log_bin to on. Without this, the precheck fails and the task cannot start. See Enable binary logging and Modify parameters. > Note: Enabling binary logging on a PolarDB for MySQL cluster consumes storage space and incurs fees.

    • Retain binary logs for at least 3 days (7 days recommended). A shorter retention period may prevent DTS from reading the required logs, which can cause data inconsistency or data loss—issues not covered by the DTS Service-Level Agreement (SLA). See Modify the retention period.

  • Operations to avoid during migration:

    • Do not perform DDL operations that change the database or table schema during schema migration or full data migration. Doing so causes the task to fail.

    • If you run full data migration only (without incremental), do not write new data to the source. To maintain real-time consistency, select schema migration, full data migration, and incremental data migration together.

    • Data changes from operations not recorded in binary logs—such as physical backup recovery or cascade operations—are not migrated. > Note: If this occurs, run a full data migration again when your business allows.

Other limits

  • Read-only nodes: migration of read-only nodes from the source PolarDB for MySQL cluster is not supported.

  • OSS external tables: migration of OSS external tables from the source is not supported.

  • Primary/secondary failover: DTS does not support source database primary/secondary failover during full migration. If a failover occurs, reconfigure the task promptly.

  • Destination table models: data can be migrated only to tables that use the Unique Key model or Duplicate Key model in Doris.

    • Duplicate Key model: duplicate data may appear if a retry or restart occurs, or if two or more DML operations are performed on the same row after the task starts. Deduplicate using the additional columns (_is_deleted, _version, _record_id). DTS converts UPDATE and DELETE statements to INSERT statements for Duplicate Key model tables.

  • `bucket_count` parameter: the only configurable parameter in the Selected Objects box. Must be a positive integer. Default: auto.

  • Cluster creation: do not create clusters in the destination Doris database during migration. If this causes a failure, restart the migration instance to resume.

  • Object name requirements:

    • Doris supports only database and table names that start with a letter. Use the object name mapping feature to rename objects that do not meet this requirement.

    • If a database, table, or column name contains Chinese characters, use the object name mapping feature to rename it (for example, to an English equivalent). Otherwise, the task may fail.

  • DDL restrictions: DDL operations that modify multiple columns simultaneously, or that modify the same table in succession, are not supported.

  • Backend (BE) nodes: do not add BE nodes to the destination Doris database during migration. If this causes a failure, restart the migration instance to resume.

  • Multi-table merge: when migrating data from multiple source tables into a single destination table, all source table schemas must be consistent. Inconsistent schemas may cause data inconsistency or task failure.

  • VARCHAR length: in PolarDB for MySQL, VARCHAR(M) specifies character length. In Doris, VARCHAR(N) specifies byte length. If you are not using DTS schema migration, set the VARCHAR field length in Doris to four times the MySQL length.

  • Online DDL tools:

    • DTS supports online DDL changes performed using DMS or gh-ost. DTS migrates only the original DDL statements, not temporary table data. However, the destination table may be locked during this process.

    • DTS does not support online DDL changes performed using tools such as pt-online-schema-change on the source. Such changes on the source may cause data loss or task failure.

  • Performance impact: during full migration, DTS reads from the source and writes to the destination, increasing database server load. Run migration during off-peak hours when the CPU load is below 30%.

  • Tablespace fragmentation: concurrent INSERT operations during full migration cause table fragmentation in the destination. After full migration, the used tablespace in the destination will be larger than in the source.

  • Concurrent writes to destination: writing data from other sources to the destination during migration may cause data inconsistency.

  • Heartbeat table: DTS periodically runs CREATE DATABASE IF NOT EXISTS \test\`` on the source to advance the binary log offset.

  • Incremental migration latency: DTS uses a batch synchronization policy to reduce load on the destination. By default, DTS writes to a single object at most every 5 seconds, resulting in a typical synchronization latency within 10 seconds. To reduce latency, adjust the selectdb.reservoir.timeout.milliseconds parameter in the console. Valid range: 1,000–10,000 milliseconds.

    A smaller value increases write frequency, which may increase the load and response time (RT) of the destination and, in turn, increase synchronization latency. Adjust based on the destination load.
  • Instance recovery: if a DTS instance fails, the helpdesk attempts recovery within 8 hours. During recovery, DTS may restart the instance or adjust its parameters (only DTS instance parameters—not database parameters). See Modify instance parameters for the parameters that may be modified.

Migrate data from PolarDB for MySQL to Doris

Step 1: Open the Data Migration page

Use one of the following methods to navigate to the Data Migration page and select the region where the migration instance resides.

DTS console

  1. Log on to the DTS console.DTS console

  2. In the left-side navigation pane, click Data Migration.

  3. In the upper-left corner, select the region where the data migration instance resides.

DMS console

Note

The actual steps may vary based on the mode and layout of the DMS console. See Simple mode and Customize the layout and style of the DMS console.

  1. Log on to the DMS console.DMS console

  2. In the top navigation bar, move the pointer over Data + AI > DTS (DTS) > Data Migration.

  3. From the drop-down list to the right of Data Migration Tasks, select the region where the data migration instance resides.

Step 2: Configure source and destination databases

  1. Click Create Task.

  2. Configure the source and destination database parameters described in the following table.

    CategoryParameterDescription
    N/ATask NameThe name of the DTS task. DTS auto-generates a name. Specify a descriptive name that makes the task easy to identify. The name does not need to be unique.
    Source DatabaseSelect Existing ConnectionIf the instance is registered with DTS, select it from the drop-down list. DTS auto-fills the parameters below. If not registered, configure the parameters manually.
    Database TypeSelect PolarDB for MySQL.
    Access MethodSelect Alibaba Cloud Instance.
    Instance RegionSelect the region where the source PolarDB for MySQL cluster resides.
    Replicate Data Across Alibaba Cloud AccountsSelect No to use an instance under the current Alibaba Cloud account.
    PolarDB Cluster IDSelect the ID of the source PolarDB for MySQL cluster.
    Database AccountEnter the database account of the source cluster. See Permissions required for database accounts.
    Database PasswordEnter the password for the database account.
    EncryptionSelect a connection method. For SSL encryption, see Set SSL encryption.
    Destination DatabaseSelect Existing ConnectionIf the instance is registered with DTS, select it from the drop-down list. DTS auto-fills the parameters below. If not registered, configure the parameters manually.
    Database TypeSelect Doris.
    Access MethodSelect Self-managed Database on ECS. For other connection types, see Preparations.
    Instance RegionSelect the region where the destination Doris database resides.
    ECS Instance IDSelect the ID of the ECS instance where the Doris database is deployed. If Doris is deployed across multiple ECS instances (for example, BE or Frontend (FE) nodes on separate instances), add the CIDR blocks of DTS servers to the security rules of each ECS instance.
    Port NumberEnter the service port of the destination Doris database. Default: 9030.
    Database AccountEnter the database account of the destination Doris database. See Permissions required for database accounts.
    Database PasswordEnter the password for the database account.
  3. Click Test Connectivity and Proceed, then click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

    Make sure the CIDR blocks of DTS servers are added to the security settings of the source and destination databases. See Add DTS server IP addresses to a whitelist.

Step 3: Configure migration objects

  1. On the Configure Objects page, set the following parameters.

    ParameterDescription
    Migration TypesSelect the migration types based on your requirements:
    • Full migration only: select Schema Migration and Full Data Migration.
    • Full migration with ongoing sync: select Schema Migration, Full Data Migration, and Incremental Data Migration.
    Important

    • After migration, PolarDB for MySQL data types are converted to Doris types. If you skip Schema Migration, create destination tables using the Unique Key model or Duplicate Key model before migration. See Data type mappings, Additional column information, and Unique Key Model.
    • If you do not select Incremental Data Migration, do not write data to the source during migration.
    Processing Mode of Conflicting Tables
    • Precheck and Report Errors: DTS checks for tables with the same name in the destination. If conflicts exist, the precheck fails and the task does not start. To resolve conflicts without deleting the destination table, use object name mapping to rename the object. See Map object names.
    • Ignore Errors and Proceed: DTS skips the name conflict check.
      Warning

      This may cause data inconsistency. If schemas match, source records overwrite destination records with the same primary key. If schemas differ, partial migration or failure may occur.

    Capitalization of object names in destination instanceControls the capitalization of database, table, and column names in the destination. Default: DTS default policy. See Specify the capitalization of object names in the destination instance.
    Source ObjectsSelect one or more objects from Source Objects, then click the arrow icon to add them to Selected Objects. Select databases or tables as migration objects.
    Selected Objects
    • To rename a migration object in the destination, right-click the object. See Map object names.
    • To set the bucket count (bucket_count) for a table: right-click the table, set Enable Parameter Settings to Yesalert notification settings, enter the value, and click OK. Available only when Schema Migration is selected.
    • To select incremental SQL operations at the database or table level, right-click the object and select the SQL operations.
    • To filter rows using WHERE conditions, right-click the table and configure conditions. See Set filter conditions.
    • If you use object name mapping, other objects that depend on the mapped object may fail to migrate.
  2. Click Next: Advanced Settings and configure the following parameters.

    ParameterDescription
    Dedicated cluster for task schedulingDTS schedules tasks to the shared cluster by default. For improved stability, purchase a dedicated cluster. See What is a DTS dedicated cluster.
    Retry time for failed connectionsThe time range DTS retries a connection when the source or destination cannot be reached after the task starts. Valid values: 10–1,440 minutes. Default: 720 minutes. Set to a value greater than 30. If DTS reconnects within this window, it resumes the task; otherwise, the task fails.<br>
    Note

    If multiple tasks share the same source or destination, the most recently specified value takes precedence. DTS charges for the instance during retries.

    Retry time for other issuesThe time range DTS retries failed DDL or DML operations after the task starts. Valid values: 1–1,440 minutes. Default: 10 minutes. Set to a value greater than 10.
    Important

    This value must be smaller than Retry time for failed connections.

    Enable throttling for full data migrationLimits read and write operations during full migration to reduce server load. Configure Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s). Available only when Full Data Migration is selected.
    Enable throttling for incremental data migrationLimits operations during incremental migration. Configure RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s). Available only when Incremental Data Migration is selected.
    Whether to delete SQL operations on heartbeat tables of forward and reverse tasksControls whether DTS writes SQL operations on heartbeat tables to the source while the instance is running.
    • Yes: does not write heartbeat table operations. A latency may appear on the DTS instance.
    • No: writes heartbeat table operations. This may affect features such as physical backup and cloning of the source database.
    Environment tag(Optional) Select a tag to identify the instance.
    Configure ETLSpecifies whether to configure the extract, transform, and load (ETL) feature. See What is ETL?
    Monitoring and alertingConfigures alerts for the task. If the task fails or migration latency exceeds the threshold, alert contacts are notified.
  3. (Optional) Click Next: Configure Database and Table Fields to set the Primary Key Column, Distribution Key, and Engine for destination tables.

    - This step is available only if you selected Schema Migration in the previous step. Set Definition Status to All to view and modify all tables. - For Primary Key Column, select one or more columns to form a composite primary key. At least one Primary Key Column must also be set as the Distribution Key. - For tables without primary keys or UNIQUE constraints, set Engine to duplicate. Otherwise, migration may fail or data may be lost.

Step 4: Run a precheck and start migration

  1. Click Next: Save Task Settings and Precheck.

    - To view the API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters. - DTS runs a precheck before starting the task. The task starts only after passing the precheck. - If the precheck fails, click View Details next to each failed item, fix the issues, and run the precheck again. - If an alert is triggered during the precheck: for alerts that cannot be ignored, fix the issue and rerun the precheck. For alerts that can be ignored, click Confirm Alert Details > Ignore > OK, then run the precheck again. Ignoring alerts may cause data inconsistency or expose your business to risk.
  2. After Success Rate reaches 100%, click Next: Purchase Instance.

  3. On the Purchase Instance page, configure the following parameters.

    SectionParameterDescription
    New Instance ClassResource GroupThe resource group for the migration instance. Default: default resource group. See What is Resource Management?
    Instance ClassThe instance class determines migration speed. Select a class based on your requirements. See Instance classes of data migration instances.
  4. Read and accept Data Transmission Service (Pay-as-you-go) Service Terms, then click Buy and Start. In the confirmation message, click OK.

Track progress on the Data Migration page.

If the task cannot migrate incremental data, it stops automatically. The Status column shows Completed.
If the task migrates incremental data, it runs continuously and does not stop automatically. The Status column shows Running.

Data type mappings

When DTS migrates data from PolarDB for MySQL to Doris, the following type conversions apply.

CategoryPolarDB for MySQL typeDoris typeNotes
IntegerTINYINTTINYINT
TINYINT UNSIGNEDSMALLINTUnsigned types are promoted to the next signed type to avoid overflow.
SMALLINTSMALLINT
SMALLINT UNSIGNEDINT
MEDIUMINTINT
MEDIUMINT UNSIGNEDBIGINT
INTINT
INT UNSIGNEDBIGINT
BIGINTBIGINT
BIGINT UNSIGNEDLARGEINT
BIT(M)INT
DecimalDECIMALDECIMALZEROFILL is not supported.
NUMERICDECIMAL
FLOATFLOAT
DOUBLEDOUBLE
BOOL / BOOLEANBOOLEAN
Date and timeDATEDATEV2
DATETIME[(fsp)]DATETIMEV2
TIMESTAMP[(fsp)]DATETIMEV2
TIME[(fsp)]VARCHARDoris has no native TIME type.
YEAR[(4)]INT
StringCHAR / VARCHARVARCHAR
Important

To avoid data loss, CHAR and VARCHAR(n) are converted to VARCHAR(4×n). If no length is specified, the default is VARCHAR(65533). Data longer than 65,533 characters is converted to STRING.

BINARY / VARBINARYSTRING
TINYTEXT / TEXT / MEDIUMTEXT / LONGTEXTSTRING
TINYBLOB / BLOB / MEDIUMBLOB / LONGBLOBSTRING
ENUMSTRING
SETSTRING
JSONSTRING

Additional column information

For tables that use the Duplicate Key model, DTS automatically adds the following columns to the destination tables. Use these columns to deduplicate data.

Column nameData typeDefault valueDescription
_is_deletedINT0Indicates whether the row is deleted. INSERT and UPDATE set this to 0; DELETE sets this to 1.
_versionBIGINT0For full data migration: 0. For incremental data migration: the timestamp in seconds from the source binary log.
_record_idBIGINT0For full data migration: 0. For incremental data migration: the unique, auto-incrementing record ID of the incremental log entry.