UpdateDIJob
Updates a new-version Data Integration task. Currently supported node types include the full-database real-time synchronization solutions from MySQL to Hologres.
Operation description
Updates a new-version Data Integration task. Currently supported node types include the full-database real-time synchronization solutions from MySQL to Hologres.
Prerequisites: Before you invoke this operation, you must activate DataWorks Enterprise Edition or Ultimate Edition. If the edition is not activated, the operation returns a 403 Forbidden.Access error.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DIJobId |
integer |
No |
The task ID. |
11588 |
| Description |
string |
No |
The task description. |
Synchronize data from MySQL to Hologres |
| ResourceSettings |
object |
No |
The resource settings. |
|
| OfflineResourceSettings |
object |
No |
The offline synchronization resources. |
|
| ResourceGroupIdentifier |
string |
No |
The identifier of the Data Integration resource group used for offline synchronization. |
S_res_group_111_222 |
| RealtimeResourceSettings |
object |
No |
The real-time synchronization resources. |
|
| ResourceGroupIdentifier |
string |
No |
The identifier of the Data Integration resource group used for real-time synchronization. |
S_res_group_111_222 |
| RequestedCu |
number |
No |
The number of compute units (CUs) of the resource group used for full and incremental synchronization tasks. |
2.0 |
| TransformationRules |
array<object> |
No |
The list of transformation rule definitions for synchronization objects. Each element in the list represents a transformation rule definition. |
|
|
object |
No |
The transformation rule definition for a synchronization object. |
||
| RuleName |
string |
No |
The rule name. The rule name must be unique when the action type and the target type of the action are the same. |
rename_rule_1 |
| RuleActionType |
string |
No |
The action type. Valid values:
|
Rename |
| RuleTargetType |
string |
No |
The target type of the action. Valid values:
|
Table |
| RuleExpression |
string |
No |
The rule expression in JSON string format. Example of the rename rule (Rename): {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922","variables":[{"variableName":"srcDatabaseName","variableRules":[{"from":"fromdb","to":"todb"}]}]} expression: the expression for the rename transformation rule. Supported variables in the expression include: ${srcDatasourceName} (source data source name), ${srcDatabaseName} (source database name), and ${srcTableName} (source table name). variables: the generation rules for each variable in the rename transformation rule expression. The default value of the parameter is the original value of the corresponding meaning at the source. You can define a set of character string replacement rules to rewrite the original value as needed. variableName: the variable name, excluding ${}. variableRules: the variable generation rule group, which performs replacements in sequential execution. from: the original character string. to: the replaced character string. Example of the rule to add a specified column and assign a value at the destination (AddColumn): {"columns":[{"columnName":"my_add_column","columnValueType":"Constant","columnValue":"123"}]} If not specified, the default rule is not to add columns or perform replication. columnName: the name of the appended column. columnValueType: the value type of the appended column, including Constant (constant) and Variable (variable). columnValue: the value of the appended column. When valueType is Constant, value is a custom constant of the character string type. When valueType is Variable, value is a built-in variable. Valid values for built-in variables include: EXECUTE_TIME (execution time, Long type), DB_NAME_SRC (source database name, character string type), DATASOURCE_NAME_SRC (source data source name, character string type), TABLE_NAME_SRC (source table name, character string type), DB_NAME_DEST (destination database name, character string type), DATASOURCE_NAME_DEST (destination data source name, character string type), TABLE_NAME_DEST (destination table name, character string type), and DB_NAME_SRC_TRANSED (transformed database name, character string type). Example of specifying the primary key column names for the destination table (DefinePrimaryKey): {"columns":["ukcolumn1","ukcolumn2"]} If not specified, the source primary key columns are used by default. When the destination is an existing table: the Data Integration system does not modify the destination table schema. If the specified primary key columns are not in the column set of the destination, an error is reported when the task starts. When the destination uses automatic creation: the Data Integration system performs automatic creation of the destination table schema, which includes the defined primary key columns. If the specified primary key columns are not in the column set of the destination, an error is reported when the task starts. Example of the DML processing rule (HandleDml): {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]} If not specified, the default rule is Normal for Insert, Update, and Delete. dmlType: the type of DML operations, including Insert (insert), Update (update), and Delete (delete). dmlAction: the DML processing policy, including Normal (normal processing), Ignore (ignore), Filter (conditional normal processing, used when dmlType is Update or Delete), and LogicalDelete (logical delete). filterCondition: the DML filter condition, used when dmlAction is Filter. |
{"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
| TableMappings |
array<object> |
No |
The list of transformation mappings for synchronization objects. Each element in the list describes a set of source synchronization object selection rules and a list of synchronization object transformation rules applied to this set of synchronization objects. |
|
|
array<object> |
No |
The transformation mapping for a synchronization object. |
||
| SourceObjectSelectionRules |
array<object> |
No |
The source object selection rules. Multiple rules are supported. |
|
|
object |
No |
Each rule can select different object types of the source objects to be synchronized, such as source databases and source tables. |
||
| ObjectType |
string |
No |
The object type. Valid values:
|
Table |
| Expression |
string |
No |
The expression. |
mysql_table_1 |
| TransformationRules |
array<object> |
No |
The list of transformation rules applied to the source objects. |
|
|
object |
No |
The transformation rule applied to a source object. |
||
| RuleName |
string |
No |
The rule name. The rule name must be unique under a specific combination of action type and target type of the action. |
rename_rule_1 |
| RuleActionType |
string |
No |
The action type. Valid values:
|
Rename |
| RuleTargetType |
string |
No |
The target type of the action. Valid values:
|
Table |
| JobSettings |
object |
No |
The settings at the synchronization task level, including DDL processing policies, column data type mapping policies between the source and destination, and task runtime parameters. |
|
| DdlHandlingSettings |
array<object> |
No |
The DDL processing settings. Multiple values are supported. |
|
|
object |
No |
The DDL processing setting. |
||
| Type |
string |
No |
The DDL type. Valid values:
|
AddColumn |
| Action |
string |
No |
The processing action. Valid values:
|
Critical |
| ColumnDataTypeSettings |
array<object> |
No |
The column data type mappings. Multiple values are supported. |
|
|
object |
No |
The column data type mapping. |
||
| SourceDataType |
string |
No |
The source data type. |
bigint |
| DestinationDataType |
string |
No |
The destination data type. |
text |
| RuntimeSettings |
array<object> |
No |
The runtime settings. Multiple values are supported. |
|
|
object |
No |
The runtime setting. |
||
| Name |
string |
No |
The setting name. Valid values:
|
runtime.offline.concurrent |
| Value |
string |
No |
The setting value. |
1 |
| CycleScheduleSettings |
object |
No |
The periodic scheduling settings. |
|
| ScheduleParameters |
string |
No |
The scheduling parameters. |
bizdate=$bizdate |
| ChannelSettings |
string |
No |
The channel-related task settings in JSON string format. |
{"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""} |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
AAC30B35-820D-5F3E-A42C-E96BB6379325 |
Examples
Success response
JSON format
{
"RequestId": "AAC30B35-820D-5F3E-A42C-E96BB6379325"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.