CreateDIJob
Creates a task in the new version of Data Integration. Currently supported task types include the full-database real-time synchronization solution from MySQL to Hologres.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. You can call the ListProjects operation to obtain the workspace ID. |
10000 |
| JobName |
string |
No |
The name of the task. |
mysql_to_holo_sync_8772 |
| Description |
string |
No |
The description of the task. |
Synchronize mysql to hologres |
| MigrationType |
string |
No |
The synchronization type. Valid values:
|
FullAndRealtimeIncremental |
| SourceDataSourceType |
string |
No |
The type of the source data source. Valid value: MySQL. |
MySQL |
| DestinationDataSourceType |
string |
No |
The type of the destination data source. Valid values: Hologres and Hive. |
Hologres |
| SourceDataSourceSettings |
array<object> |
No |
The settings of the source data source. Currently, only a single data source is supported. |
|
|
array<object> |
No |
The settings of the source data source. |
||
| DataSourceName |
string |
No |
The name of the data source. |
mysql_datasource_1 |
| DataSourceProperties |
object |
No |
The properties of the data source. |
|
|
string |
No |
The properties of the source data source. For a MySQL data source, supported property names include TimeZone (time zone) and Encoding (encoding). |
TimeZone |
|
| DestinationDataSourceSettings |
array<object> |
No |
The settings of the destination data source. Currently, only a single data source is supported. |
|
|
array<object> |
No |
The settings of the destination data source. |
||
| DataSourceName |
string |
No |
The name of the data source. |
holo_datasource_1 |
| DataSourceProperties |
object |
No |
The properties of the data source. |
|
|
string |
No |
The properties of the destination data source. Currently, no properties can be configured for a Hologres data source. |
TimeZone |
|
| ResourceSettings |
object |
No |
The resource settings. |
|
| OfflineResourceSettings |
object |
No |
The batch synchronization resources. |
|
| ResourceGroupIdentifier |
string |
No |
The identifier of the Data Integration resource group used for batch 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 the full and incremental synchronization task. |
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 name of the rule. 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 a rename rule (Rename): {"expression":"${srcDatasourceName}_${srcDatabaseName}_0922","variables":[{"variableName":"srcDatabaseName","variableRules":[{"from":"fromdb","to":"todb"}]}]}
Example of a rule to add a specified column and assign a value at the destination (AddColumn): {"columns":[{"columnName":"my_add_column","columnValueType":"Constant","columnValue":"123"}]}
Example of specifying the primary key column names for the destination table (DefinePrimaryKey): {"columns":["ukcolumn1","ukcolumn2"]}
Example of a DML handling rule (HandleDml): {"dmlPolicies":[{"dmlType":"Delete","dmlAction":"Filter","filterCondition":"id > 1"}]}
|
{"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 the source objects. |
||
| RuleName |
string |
No |
The name of the rule. 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 handling policies, column data type mapping policies between the source and destination, and task runtime parameters. |
|
| DdlHandlingSettings |
array<object> |
No |
The DDL handling settings. |
|
|
object |
No |
The DDL handling settings. |
||
| Type |
string |
No |
The DDL type. Valid values:
|
AddColumn |
| Action |
string |
No |
The handling action. Valid values:
|
Critical |
| ColumnDataTypeSettings |
array<object> |
No |
The column type mappings. Multiple values are supported. |
|
|
object |
No |
The column 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 name of the setting. Valid values:
|
runtime.offline.concurrent |
| Value |
string |
No |
The value of the setting. |
1 |
| CycleScheduleSettings |
object |
No |
The periodic scheduling settings. |
|
| CycleMigrationType |
string |
No |
The synchronization type that requires periodic scheduling. Valid values:
|
Full |
| 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":""} |
| ImportRuleSettings |
object |
No |
The import settings for the synchronization task. |
|
| Source |
string |
No |
The source from which the task configuration is imported. Valid value: Datastudio (synchronization tasks in Data Studio). |
Datastudio |
| FileId |
string |
No |
The ID of the task to be imported. |
10000 |
| SystemDebug |
string |
No |
Used for system debugging. Default value: false. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
4F6AB6B3-41FB-5EBB-AFB2-0C98D49DA2BB |
| DIJobId |
integer |
The ID of the Data Integration task. |
11792 |
Examples
Success response
JSON format
{
"RequestId": "4F6AB6B3-41FB-5EBB-AFB2-0C98D49DA2BB",
"DIJobId": 11792
}
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.