Set Target Primary Keys
BladePipe allows you to define target primary keys for tables in your target database during the creation of a DataJob. Assigning accurate primary key mappings is essential for maintaining robust data consistency.
This topic describes how to configure and define target primary keys within your data synchronization pipeline.
Set Target Primary Keys
To set up your primary key constraints, follow these steps:
Select DataSources
- In the navigation bar, click DataJob > Create DataJob.
- Configure settings for both the source and target databases, and then click Test Connection for each.
- Select your designated database or Schema.
- Click Next.
Configure the DataJob
- On the DataJob configuration page, select your DataJob type. BladePipe selects Incremental alongside Initial Load by default.
- Select your desired DataJob specification. The default specifications are suitable for most scenarios.
- Click Next.
Select Tables
- On the Tables page, choose the tables you want to migrate.
- If necessary, click Open Action Blacklist to filter out specific DDL or DML operations.
- Click Next.
Configure Columns
- On the Data Processing page, select a table from your list, and check the columns you want to synchronize.
- Configure your target primary key via one of two methods:
- Configure Individually: Alongside your selected table, click Operation > Target Primarykey. Choose the column to act as your primary key.
- Configure via Batch: Click Batch Operation > Set Target Primarykey to rapidly define uniform primary keys across multiple tables.
信息
You can use Virtual Columns as your target primary key.
Confirm
- On the Creation page, review your DataJob configurations.
- Click Create DataJob.
Monitor
- View your DataJob progress in the DataJob list.
- Click Details in the operation column to track specific execution metrics and properties.