查看Data Integration新版任務,當前支援的任務類型包括:MySQL到Hologres整庫即時解決方案。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dataworks:* |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DIJobId |
integer |
是 |
任務 ID。 |
11588 |
| WithDetails |
boolean |
否 |
是否返回詳細配置資訊,詳細配置資訊包括 TransformationRules、TableMappings、JobSettings。預設返回。 |
true |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
響應。 |
||
| Data |
object |
任務資訊。 |
|
| ProjectId |
integer |
工作空間的 ID。 |
22 |
| DIJobId |
integer |
任務 ID。 |
11588 |
| JobName |
string |
任務名稱。 |
mysql_to_holo_sync_445 |
| Description |
string |
描述資訊。 |
Synchronize mysql to hologres |
| MigrationType |
string |
同步類型,可選的枚舉值有:
|
FullAndRealtimeIncremental |
| SourceDataSourceType |
string |
源端資料來源類型,枚舉值:MySQL。 |
MySQL |
| DestinationDataSourceType |
string |
目標端資料來源類型,枚舉值:Hologres、Hive。 |
Hologres |
| SourceDataSourceSettings |
array<object> |
源端資料來源設定,目前僅支援單個資料來源。 |
|
|
array<object> |
源端資料來源設定。 |
||
| DataSourceName |
string |
資料來源名稱。 |
mysql_datasource_1 |
| DataSourceProperties |
object |
資料來源屬性。 |
|
|
string |
源端資料來源屬性。 MySQL 資料來源支援的屬性名稱包括:TimeZone(時區),Encoding(編碼)。 |
TimeZone |
|
| DestinationDataSourceSettings |
array<object> |
目標端資料來源設定,目前僅支援單個資料來源。 |
|
|
array<object> |
目標端資料來源設定。 |
||
| DataSourceName |
string |
資料來源名稱。 |
holo_datasource_1 |
| DataSourceProperties |
object |
資料來源屬性。 |
|
|
string |
目標端資料來源屬性。Hologres 資料來源暫無屬性可設定。 |
TimeZone |
|
| ResourceSettings |
object |
資源設定。 |
|
| OfflineResourceSettings |
object |
離線同步資源。 |
|
| ResourceGroupIdentifier |
string |
離線同步使用的Data Integration資源群組標識。 |
S_res_group_111_222 |
| RealtimeResourceSettings |
object |
即時同步資源。 |
|
| ResourceGroupIdentifier |
string |
即時同步使用的Data Integration資源群組標識。 |
S_res_group_111_222 |
| RequestedCu |
number |
增全量同步任務使用的資源群組 cu。 |
2.0 |
| TransformationRules |
array<object> |
同步對象轉換規則定義列表,列表中每個元素為一條轉換規則定義。 |
|
|
object |
同步對象轉換規則定義。 |
||
| RuleActionType |
string |
動作類型,可選的枚舉值:
|
Rename |
| RuleExpression |
string |
規則運算式,json string 格式。
|
{"expression":"${srcDatasoureName}_${srcDatabaseName}"} |
| RuleName |
string |
規則名稱,當動作類型和動作作用的目標類型相同時,規則名稱需保證唯一性。 |
rename_rule_1 |
| RuleTargetType |
string |
動作作用的目標類型,可選的資料類型有:
|
Table |
| TableMappings |
array<object> |
同步對象轉換映射列表,列表中每個元素描述了一組源端同步對象選擇規則列表和在該組同步對象上應用的同步對象轉換規則列表。 |
|
|
array<object> |
同步對象轉換映射。 |
||
| SourceObjectSelectionRules |
array<object> |
源端對象選擇規則,支援多條。 |
|
|
object |
每條規則可選擇待同步源端對象的不同物件類型,如選擇源端資料庫、源端資料表。 |
||
| Expression |
string |
運算式。 |
mysql_table_1 |
| ObjectType |
string |
物件類型,可選的枚舉值有:
|
Table |
| TransformationRules |
array<object> |
源端對象上應用的轉換規則列表。 |
|
|
object |
源端對象上應用的轉換規則。 |
||
| RuleActionType |
string |
動作類型,可選的枚舉值:
|
Rename |
| RuleName |
string |
規則名稱,在一種動作類型+動作作用的目標類型下規則名稱唯一。 |
rename_rule_1 |
| RuleTargetType |
string |
動作作用的目標類型,可選的枚舉值有:
|
Table |
| JobSettings |
object |
同步任務維度設定,含 DDL 處理策略、源端和目標端列資料類型映射策略、任務運行時參數等。 |
|
| ColumnDataTypeSettings |
array<object> |
列類型映射,支援多值。 |
|
|
object |
列類型映射。 |
||
| SourceDataType |
string |
源端類型。 |
bigint |
| DestinationDataType |
string |
目標端類型。 |
text |
| DdlHandlingSettings |
array<object> |
DDL 處理設定,支援多值。 |
|
|
object |
DDL 處理設定。 |
||
| Action |
string |
處理動作,可選的枚舉值:
|
Critical |
| Type |
string |
DDL 類型,可選的枚舉值:
|
AddColumn |
| RuntimeSettings |
array<object> |
運行時設定,支援多值。 |
|
|
object |
運行時設定。 |
||
| Name |
string |
設定名稱,可選的枚舉值:
|
runtime.offline.concurrent |
| Value |
string |
設定取值。 |
1 |
| CycleScheduleSettings |
object |
周期調度設定。 |
|
| CycleMigrationType |
string |
需要周期調度的同步類型。取值範圍:
|
Full |
| ScheduleParameters |
string |
調度參數。 |
bizdate=$bizdate |
| ChannelSettings |
string |
通道相關任務設定,Json String 形式。 |
{"structInfo":"MANAGED","storageType":"TEXTFILE","writeMode":"APPEND","partitionColumns":[{"columnName":"pt","columnType":"STRING","comment":""}],"fieldDelimiter":""} |
| CreatedTime |
integer |
建立時間戳記,單位秒。 |
1671516776 |
| CreatedUid |
string |
建立者使用者識別碼。 |
100000001 |
| UpdatedTime |
integer |
最近一次更新時間戳記,單位秒。 |
1673859985 |
| UpdatedUid |
string |
最近一次更新者使用者識別碼。 |
100000001 |
| StartedTime |
integer |
最近一次啟動時間戳記,單位秒。 |
1673859999 |
| StartedUid |
string |
最近一次啟動者使用者識別碼。 |
100000001 |
| JobStatus |
string |
同步狀態,可選的枚舉值:
|
Finished |
| ErrorMessage |
string |
錯誤資訊,當 JobStatus=Failed 時使用。 |
error details xxx |
| RunStats |
object |
運行統計資訊 |
|
|
string |
運行統計資訊詳情。
|
StructureMigrationTotalTables |
|
| RequestId |
string |
請求 ID。 |
0000-ABCD-EFG**** |
樣本
正常返回樣本
JSON格式
{
"Data": {
"ProjectId": 22,
"DIJobId": 11588,
"JobName": "mysql_to_holo_sync_445",
"Description": "Synchronize mysql to hologres\n",
"MigrationType": "FullAndRealtimeIncremental",
"SourceDataSourceType": "MySQL",
"DestinationDataSourceType": "Hologres",
"SourceDataSourceSettings": [
{
"DataSourceName": "mysql_datasource_1",
"DataSourceProperties": {
"key": "TimeZone"
}
}
],
"DestinationDataSourceSettings": [
{
"DataSourceName": "holo_datasource_1",
"DataSourceProperties": {
"key": "TimeZone"
}
}
],
"ResourceSettings": {
"OfflineResourceSettings": {
"ResourceGroupIdentifier": "S_res_group_111_222"
},
"RealtimeResourceSettings": {
"ResourceGroupIdentifier": "S_res_group_111_222"
},
"RequestedCu": 2
},
"TransformationRules": [
{
"RuleActionType": "Rename",
"RuleExpression": "{\"expression\":\"${srcDatasoureName}_${srcDatabaseName}\"}",
"RuleName": "rename_rule_1",
"RuleTargetType": "Table"
}
],
"TableMappings": [
{
"SourceObjectSelectionRules": [
{
"Expression": "mysql_table_1",
"ObjectType": "Table"
}
],
"TransformationRules": [
{
"RuleActionType": "Rename",
"RuleName": "rename_rule_1",
"RuleTargetType": "Table"
}
]
}
],
"JobSettings": {
"ColumnDataTypeSettings": [
{
"SourceDataType": "bigint",
"DestinationDataType": "text"
}
],
"DdlHandlingSettings": [
{
"Action": "Critical",
"Type": "AddColumn"
}
],
"RuntimeSettings": [
{
"Name": "runtime.offline.concurrent",
"Value": "1"
}
],
"CycleScheduleSettings": {
"CycleMigrationType": "Full",
"ScheduleParameters": "bizdate=$bizdate"
},
"ChannelSettings": "{\"structInfo\":\"MANAGED\",\"storageType\":\"TEXTFILE\",\"writeMode\":\"APPEND\",\"partitionColumns\":[{\"columnName\":\"pt\",\"columnType\":\"STRING\",\"comment\":\"\"}],\"fieldDelimiter\":\"\"}\n"
},
"CreatedTime": 1671516776,
"CreatedUid": "100000001",
"UpdatedTime": 1673859985,
"UpdatedUid": "100000001",
"StartedTime": 1673859999,
"StartedUid": "100000001",
"JobStatus": "Finished",
"ErrorMessage": "error details xxx",
"RunStats": {
"key": "StructureMigrationTotalTables"
}
},
"RequestId": "0000-ABCD-EFG****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。