Update a Data Integration task.
Operation description
This feature requires DataWorks Basic Edition or higher.
Try it now
Test
RAM authorization
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 |
| Expression |
string |
No |
The expression. |
mysql_table_1 |
| ExpressionType |
string |
No |
The type of the expression. Valid values: |
Exact |
| ObjectType |
string |
No |
The object type. Valid values:
|
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 |
rename_rule_1 |
| RuleActionType |
string |
No |
The type of the action. Valid values:
|
Rename |
| RuleTargetType |
string |
No |
The type of the target object. Valid values:
|
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,
|
{ "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: |
text |
| SourceDataType |
string |
No |
The source data type. Examples: |
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:
|
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 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:
|
Rename |
| RuleExpression |
string |
No |
The rule expression, specified as a JSON string.
|
{"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
| RuleName |
string |
No |
The name of the transformation rule. The name must be unique for a specific combination of |
rename_rule_1 |
| RuleTargetType |
string |
No |
The type of the target object. Valid values:
|
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 |
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 |
| 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.