Update a Data Integration task.
Operation description
This operation requires DataWorks Basic Edition or higher.
Try it now
Test
RAM authorization
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 |
| Expression |
string |
No |
The expression used to match object names. |
mysql_table_1 |
| ExpressionType |
string |
No |
The type of the expression. Valid values: |
Exact |
| ObjectType |
string |
No |
The type of object to which the rule applies. Valid values:
|
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 |
rename_rule_1 |
| RuleActionType |
string |
No |
The type of the action. Valid values:
|
Rename |
| RuleTargetType |
string |
No |
The type of object that the rule targets. Valid values:
|
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,
|
{ "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 |
text |
| SourceDataType |
string |
No |
The source data type, such as |
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:
|
Critical |
| Type |
string |
No |
The DDL type. Valid values:
|
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 |
| 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:
|
Rename |
| RuleExpression |
string |
No |
The rule expression, specified as a JSON string.
|
{"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
| RuleName |
string |
No |
The name of the rule. The name must be unique for a specific combination of |
rename_rule_1 |
| RuleTargetType |
string |
No |
The type of object that the rule targets. Valid values:
|
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 |
11588 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| Success |
boolean |
Indicates whether the API call was successful. Valid values:
|
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.