All Products
Search
Document Center

DataWorks:UpdateDIJob

Last Updated:Apr 07, 2026

Update a Data Integration task.

Operation description

This feature requires DataWorks Basic Edition or higher.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Id

integer

No

The ID of the synchronization job.

11588

Description

string

No

The description of the synchronization job.

DI Job Demo

TableMappings

array<object>

No

A list of object transformation mappings. Each mapping specifies a set of selection rules for source objects and a list of transformation rules that apply to the selected objects.

Note

[ { "SourceObjectSelectionRules":[ { "ObjectType":"Database", "Action":"Include", "ExpressionType":"Exact", "Expression":"biz_db" }, { "ObjectType":"Schema", "Action":"Include", "ExpressionType":"Exact", "Expression":"s1" }, { "ObjectType":"Table", "Action":"Include", "ExpressionType":"Exact", "Expression":"table1" } ], "TransformationRuleNames":[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema" } ] } ]

array<object>

No

A single object transformation mapping, which specifies a set of selection rules for source objects and a list of transformation rules to apply to those objects.

SourceObjectSelectionRules

array<object>

No

The rules for selecting source objects. Each rule can select a different type of source object to synchronize, such as a source database or table.

object

No

A rule for selecting a source object to synchronize, such as a database or table.

Action

string

No

The selection action. Valid values: Include and Exclude.

Include

Expression

string

No

The expression.

mysql_table_1

ExpressionType

string

No

The type of the expression. Valid values: Exact and Regex.

Exact

ObjectType

string

No

The object type. Valid values:

  • Table (table)

  • Schema (schema)

  • Database (database)

Table

TransformationRules

array<object>

No

The transformation rules for the source objects.

object

No

A single transformation rule for a source object.

RuleName

string

No

The name of the transformation rule. The name must be unique for a specific combination of RuleActionType and RuleTargetType and can be up to 50 characters long.

rename_rule_1

RuleActionType

string

No

The type of the action. Valid values:

  • DefinePrimaryKey: Defines a primary key.

  • Rename: Renames an object.

  • AddColumn: Adds a column.

  • HandleDml: Handles DML operations.

Rename

RuleTargetType

string

No

The type of the target object. Valid values:

  • Table (table)

  • Schema (schema)

  • Database (database)

Table

JobSettings

object

No

The settings for the synchronization job. This includes DDL handling settings, data type mappings for columns between the source and destination, and runtime parameters.

ChannelSettings

string

No

The job settings for specific data synchronization channels. You can apply special configurations to certain channels. Currently, Holo2Holo (synchronization from Hologres to Hologres) and Holo2Kafka (synchronization from Hologres to Kafka) are supported.

  1. Holo2Kafka

  • Example: {"destinationChannelSettings":{"kafkaClientProperties":[{"key":"linger.ms","value":"100"}],"keyColumns":["col3"],"writeMode":"canal"}} kafkaClientProperties: The Kafka producer parameters used when writing to Kafka.

  • keyColumns: The columns whose values are written to the key of a Kafka message.

  • writeMode: The format for writing data to Kafka. Valid values: json and canal.

  1. Holo2Holo

  • Example: {"destinationChannelSettings":{"conflictMode":"replace","dynamicColumnAction":"replay","writeMode":"replay"}}

  • conflictMode: The conflict handling policy for writing data to Hologres. Valid values: replace (overwrite) and ignore (ignore).

  • writeMode: The method for writing data to Hologres. Valid values: replay and insert.

  • dynamicColumnAction: The action for handling dynamic columns when writing data to Hologres. Valid values: replay, insert, and ignore.

{ "structInfo": "MANAGED", "storageType": "TEXTFILE", "writeMode": "APPEND", "partitionColumns": [ { "columnName": "pt", "columnType": "STRING", "comment": "" } ], "fieldDelimiter": "" }

ColumnDataTypeSettings

array<object>

No

An array of column data type mappings.

Note

["ColumnDataTypeSettings":[ { "SourceDataType":"Bigint", "DestinationDataType":"Text" } ]

object

No

A single column data type mapping.

DestinationDataType

string

No

The destination data type. Examples: bigint, boolean, string, text, datetime, timestamp, decimal, and binary. The supported data types depend on the destination data source.

text

SourceDataType

string

No

The source data type. Examples: bigint, boolean, string, text, datetime, timestamp, decimal, and binary. The supported data types depend on the source data source.

bigint

CycleScheduleSettings

object

No

The settings for periodic scheduling.

ScheduleParameters

string

No

The scheduling parameters.

bizdate=$bizdate

DdlHandlingSettings

array<object>

No

An array of DDL handling settings.

Note

["DDLHandlingSettings":[ { "Type":"Insert", "Action":"Normal" } ]

object

No

A single DDL handling setting.

Action

string

No

The handling action. Valid values:

  • Ignore: Ignores the DDL message.

  • Critical: Reports an error and terminates the synchronization job.

  • Normal: Processes the DDL message normally.

Critical

Type

string

No

The DDL type. Valid values:

  • RenameColumn

  • ModifyColumn

  • CreateTable

  • TruncateTable

  • DropTable

  • DropColumn

  • AddColumn

AddColumn

RuntimeSettings

array<object>

No

The runtime settings.

object

No

A single runtime setting.

Name

string

No

The name of the setting. Valid values:

  • src.offline.datasource.max.connection: The maximum number of concurrent connections to the source for an offline synchronization job.

  • dst.offline.truncate: Specifies whether to truncate the destination table before an offline synchronization job.

  • runtime.offline.speed.limit.enable: Specifies whether to enable speed limiting for an offline synchronization job.

  • runtime.offline.concurrent: The concurrency level for an offline synchronization job.

  • runtime.enable.auto.create.schema: Specifies whether to automatically create a schema at the destination.

  • runtime.realtime.concurrent: The concurrency level for a real-time synchronization job.

  • runtime.realtime.failover.minute.dataxcdc: The number of minutes to wait before a failover retry.

  • runtime.realtime.failover.times.dataxcdc: The number of failover retries.

src.offline.datasource.max.connection

Value

string

No

The value of the setting.

1

ResourceSettings

object

No

The resource settings.

OfflineResourceSettings

object

No

The resource settings for the offline synchronization job.

RequestedCu

number

No

The number of CUs for the Data Integration resource group used by the offline synchronization job.

2

ResourceGroupIdentifier

string

No

The name of the Data Integration resource group used by the offline synchronization job.

S_res_group_111_222

RealtimeResourceSettings

object

No

The resource settings for the real-time synchronization job.

RequestedCu

number

No

The number of CUs for the Data Integration resource group used by the real-time synchronization job.

2

ResourceGroupIdentifier

string

No

The name of the Data Integration resource group used by the real-time synchronization job.

S_res_group_111_222

ScheduleResourceSettings

object

No

The scheduling resource settings.

RequestedCu

number

No

The number of CUs for the scheduling resource group used by the offline synchronization job.

2

ResourceGroupIdentifier

string

No

The name of the scheduling resource group used by the offline synchronization job.

S_res_group_222_333

TransformationRules

array<object>

No

A list of transformation rule definitions.

Note

[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema", "RuleExpression":"{"expression":"${srcDatasoureName}_${srcDatabaseName}"}" } ]

object

No

A single transformation rule definition.

RuleActionType

string

No

The type of the action. Valid values:

  • DefinePrimaryKey: Defines a primary key.

  • Rename: Renames an object.

  • AddColumn: Adds a column.

  • HandleDml: Handles DML operations.

  • DefineIncrementalCondition: Defines an incremental condition.

  • DefineCycleScheduleSettings: Defines periodic scheduling settings.

  • DefinePartitionKey: Defines a partition key.

Rename

RuleExpression

string

No

The rule expression, specified as a JSON string.

  1. Rename rule (Rename)

  • Example: {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922"}

  • expression: The expression for the rename transformation rule. The expression supports variables, including ${srcDatasourceName} (source data source name), ${srcDatabaseName} (source database name), and ${srcTableName} (source table name).

  1. Add column rule (AddColumn)

  • Example: {"columns":[{"columnName":"my_add_column","columnValueType":"Constant","columnValue":"123"}]}

  • If this rule is not specified, no columns are added.

  • columnName: The name of the column to add.

  • columnValueType: The value type of the added column. Valid values: Constant and Variable.

  • columnValue: The value of the added column. If columnValueType is Constant, the value is a custom constant of the string type. If columnValueType is Variable, the value is a built-in variable. Valid built-in variables: EXECUTE_TIME (execution time, Long type), DB_NAME_SRC (source database name, String type), DATASOURCE_NAME_SRC (source data source name, String type), TABLE_NAME_SRC (source table name, String type), DB_NAME_DEST (destination database name, String type), DATASOURCE_NAME_DEST (destination data source name, String type), TABLE_NAME_DEST (destination table name, String type), and DB_NAME_SRC_TRANSED (transformed database name, String type).

  1. Define primary key rule (DefinePrimaryKey)

  • Example: {"columns":["ukcolumn1","ukcolumn2"]}

  • If this rule is not specified, the primary key of the source is used by default.

  • Data Integration does not modify the structure of an existing destination table. If a specified primary key column does not exist in the table, the synchronization job fails.

  • When a destination table is automatically created, Data Integration includes the defined primary key columns in the structure. If a specified primary key column is not in the destination column set, the synchronization job fails.

  1. DML handling rule (HandleDml)

  • Example: {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]}

  • If this rule is not specified, the default action for Insert, Update, and Delete operations is Normal.

  • dmlType: The DML operation type. Valid values: Insert, Update, and Delete.

  • dmlAction: The DML handling policy. Valid values: Normal (process the operation), Ignore (ignore the operation), Filter (conditionally process the operation, used when dmlType is Update or Delete), and LogicalDelete (perform a logical delete).

  • filterCondition: The DML filter condition, used when dmlAction is Filter.

  1. Incremental condition rule (DefineIncrementalCondition)

  • Example: {"where":"id > 0"}

  • The WHERE clause for the incremental condition.

  1. Periodic scheduling rule (DefineCycleScheduleSettings)

  • Example: {"cronExpress":" * * * * * *", "cycleType":"1"}

  • Specifies the scheduling parameters for a periodic job.

  1. Define partition key rule (DefinePartitionKey)

  • Example: {"columns":["id"]}

  • Specifies the partition key.

{"expression":"${srcDatasoureName}_${srcDatabaseName}"}

RuleName

string

No

The name of the transformation rule. The name must be unique for a specific combination of RuleActionType and RuleTargetType and can be up to 50 characters long.

rename_rule_1

RuleTargetType

string

No

The type of the target object. Valid values:

  • Table (table)

  • Schema (schema)

  • Database (database)

Table

ProjectId

integer

No

The ID of the DataWorks workspace. You can call the ListProjects operation to get the workspace ID.

10000

DIJobId deprecated

integer

No

This parameter is deprecated. Use the Id parameter instead.

11588

Owner

string

No

The owner of the synchronization job.

95279527

FileSpec

string

No

The job configuration in script mode.

{ "resourceSettings": { "realtimeResourceSettings": { "requestedCu": 2, "resourceGroupIdentifier": "Serverless_res_group_123_456" }, "offlineResourceSettings": { "requestedCu": 2, "resourceGroupIdentifier": "Serverless_res_group_123_456" } }, "tableMappings": [ { "sourceObjectSelectionRules": [ { "expression": "autotest_hologres", "action": "Include", "expressionType": "Exact", "objectType": "Datasource" }, { "expression": "auto_holo_2661647", "action": "Include", "expressionType": "Exact", "objectType": "Table" }, { "expression": "public", "action": "Include", "expressionType": "Exact", "objectType": "Schema" } ], "transformationRules": [ { "ruleTargetType": "Table", "ruleActionType": "SourceSchema", "ruleName": "SourceSchema_Table_BStf8aXPSCJjOWGe" }, { "ruleTargetType": "Schema", "ruleActionType": "Rename", "ruleName": "Rename_Schema_3qWNOIsljtInvKJy" }, { "ruleTargetType": "Table", "ruleActionType": "Rename", "ruleName": "Rename_Table_o3PVQq1aIKDGoVVW" }, { "ruleTargetType": "Table", "ruleActionType": "DefineDstTableSettings", "ruleName": "DefineDstTableSettings_Table_BhJltOmOCIc81fzi" }, { "ruleTargetType": "Table", "ruleActionType": "ColumnMapping", "ruleName": "ColumnMapping_Table_nP4hJPX1wh2W3fpo" } ] } ], "sourceDataSourceSettings": [ { "dataSourceProperties": { "timeZone": "Asia/Shanghai" }, "dataSourceName": "autotest_hologres" } ], "jobSettings": { "runtimeSettings": [ ], "ddlHandlingSettings": [ ], "columnDataTypeSettings": [ ], "cycleScheduleSettings": { }, "channelSettings": { "destinationChannelSettings": { "conflictMode": "replace", "dynamicColumnAction": "replay", "writeMode": "replay" }, "sourceChannelSettings": { } } }, "destinationDataSourceType": "Hologres", "transformationRules": [ { "ruleTargetType": "Table", "ruleName": "SourceSchema_Table_BStf8aXPSCJjOWGe", "ruleActionType": "SourceSchema", "ruleExpression": { "columns": [ { "name": "id", "category": "normal", "type": "BIGINT" }, { "name": "decimal", "category": "normal", "type": "DECIMAL" } ] } }, { "ruleTargetType": "Schema", "ruleName": "Rename_Schema_3qWNOIsljtInvKJy", "ruleActionType": "Rename", "ruleExpression": { "expression": "public" } }, { "ruleTargetType": "Table", "ruleName": "Rename_Table_o3PVQq1aIKDGoVVW", "ruleActionType": "Rename", "ruleExpression": { "expression": "auto_holo_2661647_dst" } }, { "ruleTargetType": "Table", "ruleName": "DefineDstTableSettings_Table_BhJltOmOCIc81fzi", "ruleActionType": "DefineDstTableSettings", "ruleExpression": { "ddlString": "BEGIN; CREATE TABLE IF NOT EXISTS public.auto_holo_2661647_dst ( id BIGINT PRIMARY KEY, "decimal" DECIMAL(38,18) ); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'time_to_live_in_seconds', '3153600000'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'orientation', 'column'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'binlog.level', 'replica'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'binlog.ttl', '2592000'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'bitmap_columns', '"text","char","varchar"'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'dictionary_encoding_columns', '"text":auto,"bytea":auto,"char":auto,"varchar":auto'); CALL SET_TABLE_PROPERTY('public.auto_holo_2661647_dst', 'distribution_key', '"id"'); COMMIT; ", "ddlType": "STRUCT" } }, { "ruleTargetType": "Table", "ruleName": "ColumnMapping_Table_nP4hJPX1wh2W3fpo", "ruleActionType": "ColumnMapping", "ruleExpression": { "columnMapping": [ { "sourceColName": "id", "dstColName": "id" }, { "sourceColName": "decimal", "dstColName": "decimal" } ] } } ], "migrationType": "FullAndRealtimeIncremental", "destinationDataSourceSettings": [ { "dataSourceProperties": { }, "dataSourceName": "autotest_hologres" } ], "sourceDataSourceType": "Hologres" }

Response elements

Element

Type

Description

Example

object

The response schema.

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

RequestId

string

The ID of the request. You can use this ID to troubleshoot issues.

AAC30B35-820D-5F3E-A42C-E96BB****

Examples

Success response

JSON format

{
  "Success": true,
  "RequestId": "AAC30B35-820D-5F3E-A42C-E96BB****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.