Updates a new-version synchronization task created in Data Integration. The following types of synchronization tasks are supported: real-time synchronization of all data in a MySQL database to Hologres and batch synchronization of all data in a MySQL database to Hive.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | UpdateDIJob | The operation that you want to perform. Set the value to UpdateDIJob. |
DIJobId | Long | No | 11588 | The synchronization task ID. |
Description | String | No | Data synchronization from MySQL to Hologres | The description of the synchronization task. |
ResourceSettings | Object | No | The resource settings. | |
OfflineResourceSettings | Object | No | The resource used for batch synchronization. | |
ResourceGroupIdentifier | String | No | S_res_group_111_222 | The identifier of the resource group for Data Integration used for batch synchronization. |
RealtimeResourceSettings | Object | No | The resource used for real-time synchronization. | |
ResourceGroupIdentifier | String | No | S_res_group_111_222 | The identifier of the resource group for Data Integration used for real-time synchronization. |
TransformationRules | Array | No | The list of transformation rules for objects involved in the synchronization task. Each entry in the list defines a transformation rule. | |
RuleName | String | No | rename_rule_1 | The name of the rule. If the values of the RuleActionType parameter and the RuleTargetType parameter are the same for multiple transformation rules, you must make sure that the transformation rule names are unique. |
RuleActionType | String | No | Rename | The type of the action. Valid values:
|
RuleTargetType | String | No | Table | The type of the object on which you want to perform the action. Valid values:
|
RuleExpression | String | No | {"expression":"${srcDatasoureName}_${srcDatabaseName}"} | The expression of the rule. An expression must be a JSON string. Example of a renaming rule: {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922","variables":[{"variableName":"srcDatabaseName","variableRules":[{"from":"fromdb","to":"todb"}]}]} expression: the expression of the renaming rule. You can use the following variables in an expression: ${srcDatasourceName}, ${srcDatabaseName}, and ${srcTableName}. ${srcDatasourceName} specifies the name of the source. ${srcDatabaseName} specifies the name of a source database. ${srcTableName} specifies the name of a source table. variables: the generation rule for a variable used in the expression of the renaming rule. The default value of the specified variable is the original value of the object indicated by the variable. You can define a group of string replacement rules to change the original values based on your business requirements. variableName: the name of the variable. Do not enclose the variable name in ${}. variableRules: the string replacement rules for variables. The system runs the string replacement rules in sequence for string replacement. from specifies the original string. to specifies the new string. Example of a rule used to add a specific field to the destination and assign a value to the field: {"columns":[{"columnName":"my_add_column","columnValueType":"Constant","columnValue":"123"}]} If you do not configure such a rule, no fields are added to the destination and no values are assigned by default. columnName: the name of the field that you want to add. columnValueType: the type of the value of the field. Valid values: Constant and Variable. columnValue: the value of the field that you want to add. If you set the valueType parameter to Constant, set the columnValue parameter to a custom constant of the STRING type. If you set the valueType parameter to Variable, set the columnValue to a built-in variable. The following built-in variables are supported: EXECUTE_TIME (LONG data type), DB_NAME_SRC (STRING data type), DATASOURCE_NAME_SRC (STRING data type), TABLE_NAME_SRC (STRING data type), DB_NAME_DEST (STRING data type), DATASOURCE_NAME_DEST (STRING data type), TABLE_NAME_DEST (STRING data type), and DB_NAME_SRC_TRANSED (STRING data type). EXECUTE_TIME specifies the execution time. DB_NAME_SRC specifies the name of a source database. DATASOURCE_NAME_SRC specifies the name of the source. TABLE_NAME_SRC specifies the name of a source table. DB_NAME_DEST specifies the name of a destination database. DATASOURCE_NAME_DEST specifies the name of the destination. TABLE_NAME_DEST specifies the name of a destination table. DB_NAME_SRC_TRANSED specifies the database name obtained after a transformation. Example of a rule used to specify primary key fields for a destination table: {"columns":["ukcolumn1","ukcolumn2"]} If you do not configure such a rule, the primary key fields in the mapped source table are used for the destination table by default. If the table generation method of the destination table is Use Existing Table, Data Integration does not modify the schema of the destination table. If the specified primary key fields do not exist in the destination table, an error is reported when the synchronization task starts to run. If the table generation method of the destination table is Create Table, Data Integration automatically creates the schema of the destination table. The schema contains the primary key fields that you specify. If the specified primary key fields do not exist in the destination table, an error is reported when the synchronization task starts to run. Example of a rule used to process DML messages: {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]} If you do not configure such a rule, the default processing policy for messages generated for insert, update, and delete operations is Normal. dmlType: the DML operation. Valid values: Insert, Update, and Delete. dmlAction: the processing policy for DML messages. Valid values: Normal, Ignore, Filter, and LogicalDelete. Filter indicates conditional processing. You can set the dmlAction parameter to Filter only when the dmlType parameter is set to Update or Delete. filterCondition: the condition used to filter DML messages. This parameter is required only when the dmlAction parameter is set to Filter. |
TableMappings | Array | No | The list of mappings between rules used to select synchronization objects in the source and transformation rules applied to the selected synchronization objects. Each entry in the list displays a mapping between a rule used to select synchronization objects and a transformation rule applied to the selected synchronization objects. | |
SourceObjectSelectionRules | Array | No | The rule used to select synchronization objects in the source. You can configure multiple rules. | |
ObjectType | String | No | Table | The type of the object. Valid values:
|
Expression | String | No | mysql_table_1 | The expression. |
TransformationRules | Array | No | The transformation rules applied to the selected synchronization objects. | |
RuleName | String | No | rename_rule_1 | The name of the rule. If the values of the RuleActionType parameter and the RuleTargetType parameter are the same for multiple transformation rules, you must make sure that the transformation rule names are unique. |
RuleActionType | String | No | Rename | The type of the action. Valid values:
|
RuleTargetType | String | No | Table | The type of the object on which you want to perform the action. Valid values:
|
JobSettings | Object | No | The settings for the dimension of the synchronization task. The settings include processing policies for DDL messages, policies for data type mappings between source fields and destination fields, and runtime parameters of the synchronization task. | |
DdlHandlingSettings | Array | No | The processing settings for DDL messages. The value of this parameter must be an array. | |
Type | String | No | AddColumn | The type of the DDL operation. Valid values:
|
Action | String | No | Critical | The processing policy for DDL messages. Valid values:
|
ColumnDataTypeSettings | Array | No | The settings for data type mappings between source fields and destination fields. The value of this parameter must be an array. | |
SourceDataType | String | No | bigint | The data type of a source field. |
DestinationDataType | String | No | text | The data type of a destination field. |
RuntimeSettings | Array | No | The runtime settings. | |
Name | String | No | runtime.offline.concurrent | The name of the configuration item. Valid values:
|
Value | String | No | 1 | The value of the configuration item. |
CycleScheduleSettings | Object | No | The settings for periodic scheduling. | |
ScheduleParameters | String | No | bizdate=$bizdate | The scheduling parameters. |
ChannelSettings | String | No | {"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""} | The channel control settings for the synchronization task. Configure this parameter as a JSON string. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | AAC30B35-820D-5F3E-A42C-E96BB6379325 | The request ID. |
Description
Sample requests
http(s)://[Endpoint]/?Action=UpdateDIJob
&DIJobId=11588
&Description=Data synchronization from MySQL to Hologres
&ResourceSettings={"OfflineResourceSettings":{"ResourceGroupIdentifier":"S_res_group_111_222"},"RealtimeResourceSettings":{"ResourceGroupIdentifier":"S_res_group_111_222"}}
&TransformationRules=[{"RuleName":"rename_rule_1","RuleActionType":"Rename","RuleTargetType":"Table","RuleExpression":"{\"expression\":\"${srcDatasoureName}_${srcDatabaseName}\"}"}]
&TableMappings=[{"SourceObjectSelectionRules":[{"ObjectType":"Table","Expression":"mysql_table_1"}],"TransformationRules":[{"RuleName":"rename_rule_1","RuleActionType":"Rename","RuleTargetType":"Table"}]}]
&JobSettings={"DdlHandlingSettings":[{"Type":"AddColumn","Action":"Critical"}],"ColumnDataTypeSettings":[{"SourceDataType":"bigint","DestinationDataType":"text"}],"RuntimeSettings":[{"Name":"runtime.offline.concurrent","Value":"1"}]}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateDIJobResponse>
<RequestId>AAC30B35-820D-5F3E-A42C-E96BB6379325</RequestId>
</UpdateDIJobResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "AAC30B35-820D-5F3E-A42C-E96BB6379325"
}
Error codes
HTTP status code | Error code | Error message | Description |
429 | Throttling.Api | The request for this resource has exceeded your available limit. | The number of requests for the resource has exceeded the upper limit. |
429 | Throttling.System | The DataWorks system is busy. Try again later. | The DataWorks system is busy. Try again later. |
429 | Throttling.User | Your request is too frequent. Try again later. | Excessive requests have been submitted within a short period of time. Try again later. |
500 | InternalError.System | An internal system error occurred. Try again later. | An internal error occurred. Try again later. |
500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | An internal error occurred. Try again later. |
For a list of error codes, see Service error codes.