Batch synchronization features

更新时间:
复制 MD 格式

Batch synchronization transfers full or incremental data between source and destination databases using Reader and Writer plugins. Configure data sources and scheduling parameters to automate the process. This topic describes the capabilities of batch synchronization.

Core capabilities

Offline sync provides the following capabilities:

image

Capability

Description

Data synchronization between disparate data sources

Data Integration supports 50+ data source types, including relational databases, unstructured storage, big data storage, and message queues. You can define source and destination data sources and use Reader and Writer plugins provided by Data Integration to transfer data between any structured or semi-structured sources. For more information, see Supported data sources and sync solutions.

Data synchronization in complex network environments

Batch synchronization supports ApsaraDB, on-premises data centers, self-managed databases on ECS, and databases outside Alibaba Cloud. Before configuration, ensure network connectivity between the resource group and both the source and destination endpoints. For more information about configuration, see Network connectivity solutions.

Sync scenarios

1. Sync modes

  • Periodic full synchronization: Periodically overwrites the destination table with all source data. Suitable for full-refresh scenarios.

  • Periodic incremental synchronization: Syncs only new or changed data on a daily or hourly basis. Uses built-in scheduling parameters such as ${bizdate} with a data filter WHERE condition to ensure that only specified data is pulled and written to the corresponding time partition. For more information, see Configure scheduling parameters for incremental synchronization.

  • Historical data backfill: When you need to backfill a large volume of historical data at once, use the Backfill Data feature in Operation Center to batch-run sync tasks and efficiently archive historical data.

Note

For more information about scheduling parameters, see Typical scenarios of scheduling parameters in Data Integration and Scheduling parameters.

2. Supported source structures

  • Single table to single table: The most basic sync mode. Syncs data from one source table to one destination table.

  • Sharded tables to single table:

    • Automatically aggregates data from multiple physical tables (such as order tables order_01, order_02...) and writes the data to a single destination table.

    • Supported data sources include MySQL, SQL Server, Oracle, PostgreSQL, PolarDB, and AnalyticDB. For more information, see Sync sharded tables to a single table.

Configuration methods

You can configure batch synchronization tasks in Data Integration by using the following methods.

  • Codeless UI: Configure tasks step by step through a visual guided interface. This mode is easy to learn and use but does not support some advanced features.

  • Code editor: Define sync logic directly by using JSON scripts. This mode supports more complex configurations and enables fine-grained control.

  • OpenAPI: Manage the full lifecycle of tasks through OpenAPI, supporting programmatic operations.

  • DI Agent: To quickly create and manage single-table batch synchronization tasks through AI-powered conversations, use Data Agent instead of manual form configuration. Describe your sync requirements in one sentence, and the Agent automatically identifies data sources, maps fields, assigns resource groups, and configures scheduling policies, reducing the time to create a single task from 15–30 minutes to less than 5 minutes.

Note

For more information about task configuration capabilities, see Feature overview.

O&M for batch synchronization tasks

  • Alerting: Monitors the running status of batch synchronization tasks, including scenarios such as incomplete, failed, and completed tasks. Supports multiple alert methods including email, SMS, phone calls, DingTalk group bots, and webhooks to notify alert recipients.

  • Data quality: After a task is committed and deployed, you can configure data quality monitoring rules for the destination table in Operation Center. Currently, only some database types support data quality monitoring rules.

  • Data source environment isolation: A single data source name is bound to two independent configurations for the development and production environments. During task execution, the data source is automatically switched based on the environment—development debugging uses the development environment, and production scheduling uses the production environment, preventing the risk of test operations accidentally affecting production data.

Feature overview

image

Feature

Description

Full or incremental data synchronization

Batch synchronization tasks support full or incremental data synchronization by configuring Data Filtering combined with scheduling parameters. Different plugins have different configurations for incremental synchronization. For more information about incremental data synchronization, see Configure incremental data synchronization.

Field mapping

By defining field mapping rules, source data is written to the corresponding destination fields based on the specified relationships. Ensure that the field types on both sides are compatible.

  • Multiple field mapping methods are available:

    • Wizard mode supports same-name mapping, same-row mapping, and custom field relationships. Data in unmapped fields is automatically ignored. Ensure that the corresponding destination fields have default values configured or allow null values to avoid write failures.

    • Script mode strictly maps fields based on the column configuration order. The number of fields on the reader side must exactly match the number on the writer side. Otherwise, the task fails at runtime.

  • Synchronization tasks also support dynamic value assignment for destination fields, including constants, scheduling parameters, and built-in variables such as ${bizdate}. The relevant parameters are assigned final values during the scheduling phase.

Job rate limit

  • The task concurrency control feature limits the maximum number of concurrent threads for reading from and writing to databases.

  • The sync speed feature controls traffic to prevent excessive pressure on the source or destination caused by high synchronization speeds. If throttling is not enabled, the maximum transfer performance available in the current hardware environment is provided.

Distributed task execution

Data sources that support distributed execution can use task sharding to distribute synchronization tasks across multiple nodes for concurrent execution. This enables synchronization speed to scale linearly with cluster size, breaking through single-node performance bottlenecks. This mode is especially suitable for high-throughput, low-latency synchronization scenarios and efficiently utilizes idle cluster resources to significantly improve hardware utilization.

Dirty data policy

Dirty data refers to data records that fail to be written to the destination due to exceptions such as type conflicts or constraint violations. Batch synchronization supports dirty data policies that define the acceptable number of dirty data records and their impact on tasks.

  • Ignore dirty data: Dirty data is automatically filtered out. Only valid data is written, and the task continues running.

  • Tolerate limited dirty data: Set a threshold N. If the number of dirty data records is ≤ N, the abnormal data is discarded and the task continues. If the number exceeds N, the task fails and exits.

  • No tolerance for dirty data: The task immediately fails and exits when dirty data is encountered.

Time zone

If cross-time-zone synchronization is required between the source and destination, you can configure the source time zone to perform time zone conversion.

Intelligent data processing

DataWorks supports integrating data processing capabilities during data synchronization to transform and process source data before writing it to the destination:

String replacement: The built-in string replacement feature in batch synchronization tasks allows you to perform lightweight data transformations directly during data transfer without requiring data to be landed or additional ETL steps.

AI-assisted processing: Supports integrating AI large language models during data synchronization to perform semantic analysis, sentiment analysis, and other processing on source natural language data, and writes the processed results directly to the destination table.

Data vectorization: Supports extracting and vectorizing (embedding) source data before writing it to a vector database.

Next steps

For detailed instructions on creating tasks, see: