GetDIJob
Queries a data integration task.
Operation description
You must purchase DataWorks Basic Edition or higher to use this feature.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
No |
The ID of the data integration synchronization task. You can obtain the ID from the |
11588 |
| WithDetails |
boolean |
No |
Specifies whether to return detailed configuration information. The detailed configuration information includes TransformationRules, TableMappings, and JobSettings. Default value: true. |
true |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. You can call the ListProjects operation to obtain the workspace ID. |
10000 |
DIJobId
deprecated
|
integer |
No |
[Deprecated] This field is deprecated. Use the Id field instead. |
11588 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
C99E2BE6-9DEA-5C2E-8F51-1DDCFEADE490 |
| PagingInfo |
object |
The configuration details of the synchronization task. |
|
| Id |
integer |
The ID of the task. |
32601 |
| Description |
string |
The description. |
description |
| DestinationDataSourceSettings |
array<object> |
The list of destination data source properties. |
|
|
object |
The properties of a single destination data source. |
||
| DataSourceName |
string |
The name of the destination data source. |
dw_mysql |
| DestinationDataSourceType |
string |
The type of the destination data source. Valid values: Hologres, OSS-HDFS, OSS, MaxCompute, LogHub, StarRocks, DataHub, AnalyticDB_For_MySQL, Kafka, and Hive. |
Hologres |
| JobName |
string |
The name of the task. |
imp_ods_dms_det_dealer_info_df |
| JobSettings |
object |
The runtime settings. |
|
| ChannelSettings |
string |
The channel-related task settings. You can configure specific channels. Currently, Holo2Holo (synchronization from Hologres to Hologres) and Holo2Kafka (synchronization from Hologres to Kafka) are supported.
|
{"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""} |
| ColumnDataTypeSettings |
array<object> |
The column type mappings. |
|
|
object |
The column type mappings. |
||
| DestinationDataType |
string |
The destination data type, such as bigint, boolean, string, text, datetime, timestamp, decimal, or binary. Data types vary based on the data source type. |
text |
| SourceDataType |
string |
The source data type, such as bigint, boolean, string, text, datetime, timestamp, decimal, or binary. Data types vary based on the data source type. |
bigint |
| CycleScheduleSettings |
object |
The periodic scheduling settings. |
|
| CycleMigrationType |
string |
The synchronization type that requires periodic scheduling. Valid values:
|
Full |
| ScheduleParameters |
string |
The scheduling parameters. |
bizdate=$bizdate |
| DdlHandlingSettings |
array<object> |
The array of DDL handling settings, which includes a list of DDL types to be handled and their corresponding rules. |
|
|
object |
A single DDL handling rule. |
||
| Action |
string |
The handling action. Valid values:
|
Ignore |
| Type |
string |
The DDL type. Valid values:
|
CreateTable |
| RuntimeSettings |
array<object> |
The runtime settings. |
|
|
object |
The runtime settings. |
||
| Name |
string |
The name of the setting. Valid values:
|
runtime.offline.concurrent |
| Value |
string |
The value of the setting. |
1 |
| MigrationType |
string |
The synchronization type. Valid values:
|
FullAndRealtimeIncremental |
| JobType |
string |
The task type. Valid values:
|
DatabaseRealtimeMigration |
| ProjectId |
integer |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the workspace configuration page to obtain the workspace ID. This parameter specifies the DataWorks workspace for the current API operation. |
98330 |
| ResourceSettings |
object |
The resource settings. |
|
| OfflineResourceSettings |
object |
The batch synchronization resources. |
|
| RequestedCu |
number |
The number of compute units (CUs) of the scheduling resource group used by the batch synchronization task. |
2.0 |
| ResourceGroupIdentifier |
string |
The name of the data integration resource group used for batch synchronization. |
di_resourcegroup_v1 |
| RealtimeResourceSettings |
object |
The real-time synchronization resources. |
|
| RequestedCu |
number |
The number of CUs of the data integration resource group used for real-time synchronization. |
2.0 |
| ResourceGroupIdentifier |
string |
The name of the data integration resource group used by the real-time task. |
di_resourcegroup_v1 |
| ScheduleResourceSettings |
object |
The scheduling resources. |
|
| RequestedCu |
number |
The number of CUs of the data integration resource group used by the batch scheduling task. |
2.0 |
| ResourceGroupIdentifier |
string |
The name of the scheduling resource group used by the batch scheduling task. |
schedual_resourcegroup_v1 |
| SourceDataSourceSettings |
array<object> |
The array of source data source settings. |
|
|
array<object> |
The settings of a single source data source. |
||
| DataSourceName |
string |
The name of the data source. |
dw_mysql |
| DataSourceProperties |
object |
The properties of the data source. |
|
| Encoding |
string |
The database encoding. |
UTF-8 |
| Timezone |
string |
The time zone. |
GMT+8 |
| SourceDataSourceType |
string |
The type of the source data source. Valid values: PolarDB, MySQL, Kafka, LogHub, Hologres, Oracle, OceanBase, MongoDB, RedShift, Hive, SQLServer, Doris, and ClickHouse. |
Mysql |
| TableMappings |
array<object> |
The list of transformation mappings for synchronization objects. Each element in the list describes a set of source object selection rules and a list of transformation rules applied to the selected synchronization 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> |
Each rule represents a table selected for synchronization. |
||
| SourceObjectSelectionRules |
array<object> |
Each rule selects a set of source objects to be synchronized. Multiple rules combine to select a single table. |
|
|
object |
Each rule can select different object types of the source objects to be synchronized, such as source databases or source tables. |
||
| Action |
string |
The selection action. Valid values: Include and Exclude. |
Include |
| Expression |
string |
The expression. |
mysql_table_1 |
| ExpressionType |
string |
The expression type. Valid values: Exact and Regex. |
Exact |
| ObjectType |
string |
The object type. Valid values:
|
Table |
| TransformationRules |
array<object> |
The list of transformation rule definitions for synchronization objects. Each element in the list is a transformation rule definition. |
|
|
object |
The transformation rule applied to the source object. |
||
| RuleName |
string |
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 |
The action type. Valid values:
|
AddColumn |
| RuleTargetType |
string |
The target type of the action. Valid values:
|
Table |
| TransformationRules |
array<object> |
The list of transformation rule definitions for synchronization objects. Note
[ { "RuleName":"my_database_rename_rule", "RuleActionType":"Rename", "RuleTargetType":"Schema", "RuleExpression":"{"expression":"${srcDatasoureName}_${srcDatabaseName}"}" } ] |
|
|
object |
The list of transformation rule definitions for synchronization objects. Each element in the list is a transformation rule definition. |
||
| RuleActionType |
string |
The action type. Valid values:
|
Rename |
| RuleExpression |
string |
The rule expression in JSON string format.
|
{"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
| RuleName |
string |
The name of the rule. The rule name must be unique under a specific combination of action type and target type. |
rename_rule_1 |
| RuleTargetType |
string |
The target type of the action. Valid values:
|
Table |
| JobStatus |
string |
The status of the task. Synchronization status. Valid values:
|
Running |
DIJobId
deprecated
|
string |
[Deprecated] This field is deprecated. Use the Id field instead. |
32601 |
| Owner |
string |
The owner of the task. |
3726346 |
Examples
Success response
JSON format
{
"RequestId": "C99E2BE6-9DEA-5C2E-8F51-1DDCFEADE490",
"PagingInfo": {
"Id": 32601,
"Description": "description",
"DestinationDataSourceSettings": [
{
"DataSourceName": "dw_mysql"
}
],
"DestinationDataSourceType": "Hologres",
"JobName": "imp_ods_dms_det_dealer_info_df",
"JobSettings": {
"ChannelSettings": "{\"structInfo\":\"MANAGED\",\"storageType\":\"TEXTFILE\",\"writeMode\":\"APPEND\",\"partitionColumns\":[{\"columnName\":\"pt\",\"columnType\":\"STRING\",\"comment\":\"\"}],\"fieldDelimiter\":\"\"}",
"ColumnDataTypeSettings": [
{
"DestinationDataType": "text",
"SourceDataType": "bigint"
}
],
"CycleScheduleSettings": {
"CycleMigrationType": "Full",
"ScheduleParameters": "bizdate=$bizdate\n"
},
"DdlHandlingSettings": [
{
"Action": "Ignore",
"Type": "CreateTable"
}
],
"RuntimeSettings": [
{
"Name": "runtime.offline.concurrent\n",
"Value": "1"
}
]
},
"MigrationType": "FullAndRealtimeIncremental",
"JobType": "DatabaseRealtimeMigration",
"ProjectId": 98330,
"ResourceSettings": {
"OfflineResourceSettings": {
"RequestedCu": 2,
"ResourceGroupIdentifier": "di_resourcegroup_v1"
},
"RealtimeResourceSettings": {
"RequestedCu": 2,
"ResourceGroupIdentifier": "di_resourcegroup_v1"
},
"ScheduleResourceSettings": {
"RequestedCu": 2,
"ResourceGroupIdentifier": "schedual_resourcegroup_v1"
}
},
"SourceDataSourceSettings": [
{
"DataSourceName": "dw_mysql",
"DataSourceProperties": {
"Encoding": "UTF-8\n",
"Timezone": "GMT+8\n"
}
}
],
"SourceDataSourceType": "Mysql",
"TableMappings": [
{
"SourceObjectSelectionRules": [
{
"Action": "Include",
"Expression": "mysql_table_1",
"ExpressionType": "Exact",
"ObjectType": "Table"
}
],
"TransformationRules": [
{
"RuleName": "rename_rule_1",
"RuleActionType": "AddColumn",
"RuleTargetType": "Table"
}
]
}
],
"TransformationRules": [
{
"RuleActionType": "Rename",
"RuleExpression": "{\"expression\":\"${srcDatasoureName}_${srcDatabaseName}\"}",
"RuleName": "rename_rule_1",
"RuleTargetType": "Table"
}
],
"JobStatus": "Running",
"DIJobId": "32601",
"Owner": "3726346"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.