All Products
Search
Document Center

DataWorks:UpdateDIJob

Last Updated:Mar 26, 2026

Update a Data Integration task.

Operation description

This operation 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 synchronization job ID.

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 to 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 transformation mapping. A mapping specifies the selection rules for source objects and the transformation rules to apply to them.

SourceObjectSelectionRules

array<object>

No

The rules for selecting source objects. Each rule can select different types of objects, such as source databases and tables.

object

No

A rule for selecting source objects. You can use a rule to select objects of a specific type, such as a database or table.

Action

string

No

The selection action. Valid values: Include and Exclude.

Include

Expression

string

No

The expression used to match object names.

mysql_table_1

ExpressionType

string

No

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

Exact

ObjectType

string

No

The type of object to which the rule applies. Valid values:

  • Table

  • Schema

  • Database

Table

TransformationRules

array<object>

No

The transformation rules to apply to the source objects.

object

No

A transformation rule to apply to the source objects.

RuleName

string

No

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

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 object that the rule targets. Valid values:

  • Table

  • Schema

  • Database

Table

JobSettings

object

No

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

ChannelSettings

string

No

The settings for specific data synchronization 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"}}

  • 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 (overwrites existing data) and ignore (ignores conflicts).

  • writeMode: The method for writing data to Hologres. Valid values: replay (replays the operation) and insert (inserts new data).

  • dynamicColumnAction: The action for handling dynamic columns when writing data to Hologres. Valid values: replay (replays the operation), insert (inserts new data), and ignore (ignores the dynamic columns).

{ "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, such as bigint, boolean, string, text, datetime, timestamp, decimal, and binary. The available data types may vary based on the destination.

text

SourceDataType

string

No

The source data type, such as bigint, boolean, string, text, datetime, timestamp, decimal, and binary. The available data types may vary based on the source.

bigint

CycleScheduleSettings

object

No

The settings for periodic scheduling.

ScheduleParameters

string

No

The scheduling parameters.

bizdate=$bizdate

DdlHandlingSettings

array<object>

No

The settings for DDL handling.

Note

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

object

No

A single DDL handling setting.

Action

string

No

The action to perform. Valid values:

  • Ignore: Ignores the DDL message.

  • Critical: Reports an error and terminates the job.

  • Normal: Processes the DDL message.

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 resources for offline synchronization.

RequestedCu

number

No

The number of CUs to request from the Data Integration resource group for offline synchronization.

2

ResourceGroupIdentifier

string

No

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

S_res_group_111_222

RealtimeResourceSettings

object

No

The resources for real-time synchronization.

RequestedCu

number

No

The number of CUs to request from the Data Integration resource group for real-time synchronization.

2

ResourceGroupIdentifier

string

No

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

S_res_group_111_222

ScheduleResourceSettings

object

No

The scheduling resources.

RequestedCu

number

No

The number of CUs to request from the scheduling resource group for the offline synchronization job.

2

ResourceGroupIdentifier

string

No

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

S_res_group_222_333

TransformationRules

array<object>

No

A list of transformation rule definitions for objects.

Note

[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema", "RuleExpression":"{"expression":"${srcDatasourceName}_${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 the following variables: ${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 you do not specify this rule, no columns are added.

  • columnName: The name of the column to add.

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

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

  1. Define primary key rule (DefinePrimaryKey)

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

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

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

  • If the destination table is automatically created, Data Integration creates the table structure, including the defined primary key columns. If a specified primary key column does not exist in the destination column set, the job fails to start.

  1. DML handling rule (HandleDml)

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

  • If you do not specify this rule, 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 (processes the operation), Ignore (ignores the operation), Filter (conditionally processes the operation, used when dmlType is Update or Delete), and LogicalDelete (performs a logical delete).

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

  1. Incremental condition rule (DefineIncrementalCondition)

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

  • Specifies the incremental filter 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 rule. The name must be unique for a specific combination of RuleActionType and RuleTargetType. The name can be up to 50 characters in length.

rename_rule_1

RuleTargetType

string

No

The type of object that the rule targets. Valid values:

  • Table

  • Schema

  • Database

Table

ProjectId

integer

No

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

10000

DIJobId deprecated

integer

No

This parameter is deprecated. Use the Id parameter instead.

11588

Response elements

Element

Type

Description

Example

object

The response schema.

Success

boolean

Indicates whether the API call was successful. Valid values:

  • true: The call was successful.

  • false: The call failed.

true

RequestId

string

The ID of the request. This is a unique identifier used for tracing and troubleshooting.

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.