Creates a new-version synchronization task.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dataworks:CreateDIJob | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DestinationDataSourceType | string | Yes | The destination type. Valid values: Hologres and Hive. | Hologres |
Description | string | No | The description of the synchronization task. | |
SourceDataSourceType | string | Yes | The source type. Set this parameter to MySQL. | MySQL |
ProjectId | long | No | The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied. | 10000 |
JobName | string | Yes | The name of the synchronization task. | mysql_to_holo_sync_8772 |
MigrationType | string | Yes | The synchronization type. Valid values:
| FullAndRealtimeIncremental |
SourceDataSourceSettings | array<object> | Yes | The settings of the source. Only a single source is supported. | |
object | Yes | The settings of the source. Only a single source is supported. | ||
DataSourceName | string | No | The name of the data source. | mysql_datasource_1 |
DataSourceProperties | object | No | The properties of the data source. | |
Encoding | string | No | The encoding format of the database. | UTF-8 |
Timezone | string | No | The time zone. | GMT+8 |
DestinationDataSourceSettings | array<object> | Yes | The settings of the destination. Only a single destination is supported. | |
object | Yes | The settings of the destination. Only a single destination is supported. | ||
DataSourceName | string | No | The name of the data source. | holo_datasource_1 |
ResourceSettings | object | Yes | The resource settings. | |
OfflineResourceSettings | object | No | The resource used for batch synchronization. | |
RequestedCu | double | No | The number of compute units (CUs) in the resource group for Data Integration that are used for batch synchronization. | 2.0 |
ResourceGroupIdentifier | string | No | The identifier of the resource group for Data Integration used for batch synchronization. | S_res_group_111_222 |
RealtimeResourceSettings | object | No | The resource used for real-time synchronization. | |
RequestedCu | double | No | The number of CUs in the resource group for Data Integration that are used for real-time synchronization. | 2.0 |
ResourceGroupIdentifier | string | No | The identifier of the resource group for Data Integration used for real-time synchronization. | S_res_group_111_222 |
ScheduleResourceSettings | object | No | The resource used for scheduling. | |
RequestedCu | double | No | The number of CUs in the resource group for scheduling that are used for batch synchronization. | 2.0 |
ResourceGroupIdentifier | string | No | The identifier of the resource group for scheduling used for batch synchronization. | S_res_group_235454102432001_1579085295030 |
TransformationRules | array<object> | No | The list of transformation rules for objects involved in the synchronization task. Each entry in the list defines a transformation rule. | |
object | No | The transformation rule for objects involved in the synchronization task. | ||
RuleActionType | string | No | The action type. Valid values:
| Rename |
RuleExpression | string | No | The expression of the rule. The expression must be a JSON string. Example of a renaming rule: {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922","variables":[{"variableName":"srcDatabaseName","variableRules":[{"from":"fromdb","to":"todb"}]}]}
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"}]}
Example of a rule used to specify primary key fields for a destination table: {"columns":["ukcolumn1","ukcolumn2"]}
Example of a rule used to process DML messages: {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]}
| {"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
RuleName | string | No | 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. | rename_rule_1 |
RuleTargetType | string | No | The type of the object on which you want to perform the action. Valid values:
| Table |
TableMappings | array<object> | Yes | 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. | |
object | Yes | The mapping between a rule used to select synchronization objects in the source and a transformation rule applied to the selected synchronization objects. | ||
SourceObjectSelectionRules | array<object> | No | The list of rules used to select synchronization objects in the source. The objects can be databases or tables. | |
object | No | The rule used to select synchronization objects in the source. The objects can be databases or tables. | ||
Action | string | No | The operation that is performed to select objects. Valid values: Include and Exclude. | Include |
Expression | string | No | The expression. | mysql_table_1 |
ExpressionType | string | No | The expression type. Valid values: Exact and Regex. | Exact |
ObjectType | string | No | The object type. Valid values:
| Table |
TransformationRules | array<object> | No | The list of transformation rules that you want to apply to the synchronization objects selected from the source. Each entry in the list defines a transformation rule. | |
object | No | The transformation rule that you want to apply to the synchronization objects selected from the source. | ||
RuleName | string | No | 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. | rename_rule_1 |
RuleActionType | string | No | The action type. Valid values:
| Rename |
RuleTargetType | string | No | The type of the object on which you want to perform the action. Valid values:
| Table |
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. | |
ChannelSettings | string | No | The channel control settings for the synchronization task. The value of this parameter must be a JSON string. | {"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""} |
ColumnDataTypeSettings | array<object> | No | The data type mappings between source fields and destination fields. | |
object | No | The data type mapping between a source field and a destination field. | ||
DestinationDataType | string | No | The data type of the destination field. | text |
SourceDataType | string | No | The data type of the source field. | bigint |
CycleScheduleSettings | object | No | The settings for periodic scheduling. | |
CycleMigrationType | string | No | The synchronization type that requires periodic scheduling. Valid values:
| Full |
ScheduleParameters | string | No | The scheduling parameters. | bizdate=$bizdate |
DdlHandlingSettings | array<object> | No | The processing settings for DDL messages. | |
object | No | The processing setting for a specific type of DDL message. | ||
Action | string | No | The processing policy. Valid values:
| Critical |
Type | string | No | The type of the DDL operation. Valid values:
| AddColumn |
RuntimeSettings | array<object> | No | The runtime settings. | |
object | No | |||
Name | string | No | The name of the configuration item. Valid values:
| runtime.offline.concurrent |
Value | string | No | The value of the configuration item. | 1 |
Response parameters
Examples
Sample success responses
JSON
format
{
"DIJobId": 11792,
"RequestId": "4F6AB6B3-41FB-5EBB-AFB2-0C98D49DA2BB"
}
Error codes
For a list of error codes, visit the Service error codes.