After the Change Data Capture (CDC) feature of SQL Server is enabled, SQLServer CDC
Reader allows Data Integration to monitor and collect logs about inserting, updating,
and deleting tables in SQL Server. Then, Data Integration converts the logs to real-time
messages. This way, data is synchronized from SQL Server in real time.
Prerequisites
The CDC feature is enabled before you configure SQLServer CDC Reader.
-- ====
-- Enable Database for CDC template, databaseName: MyDB
-- ====
USE MyDB
GO
EXEC sys.sp_cdc_enable_db
GO
Procedure
- Go to the DataStudio page.
- Log on to the DataWorks console.
- In the left-side navigation pane, click Workspaces.
- Select the region where the required workspace resides, find the workspace, and then
click Data Analytics.
- Move the pointer over the
icon and choose .Alternatively, you can click the required workflow, right-click Data Integration, and then choose .
- In the Create Node dialog box, set the Sync Method parameter to End-to-end ETL and set the Node Name and Location parameters.

Note The node name must be 1 to 128 characters in length. It can contain letters, digits,
underscores (_), and periods (.).
- Click Submit.
- On the configuration tab of the real-time sync node, drag SqlServer under to the canvas.
- Click SqlServer and set the parameters in the Node configuration section.
Parameter |
Description |
Data source |
The connection to the SQL Server data store. In this example, you must select an SQL
Server connection.
If no connection is available, click New data source on the right to add one on the Data Source page.
|
Table |
The name of the table from which data is to be synchronized in the specified data
store. You can click Data preview on the right to preview the selected table.
In the case of database and table sharding, data can be synchronized from multiple
databases and tables in real time.
Notice To avoid errors, the tables in database shards and table shards must use the same
schema.
|
Output field |
The fields to be synchronized, including management fields and data fields.
- Management fields: additional fields that are automatically added to the destination
tables when data is synchronized. These fields facilitate data management, sorting,
and deduplication.
- Data fields: the fields in the source tables to be synchronized.
For more information, see Fields used for real-time synchronization.
|
SQLServer CDC Reader supports database and table sharding. You can click
Add a database and table data source and select the required data stores and tables from drop-down lists to synchronize
data from multiple tables and databases.
Notice To avoid errors, the selected tables must use the same schema.
- Click the
icon in the toolbar.