該介面用於擷取檔案的詳情。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
dataworks:* |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| ProjectId |
integer |
否 |
DataWorks 工作空間的 ID。您可以登入 DataWorks 控制台,進入工作空間配置頁面擷取工作空間 ID。 該參數與 ProjectIdentifier 參數,二者必須設定其一,用來確定本次 API 呼叫操作的 DataWorks 工作空間。 |
10000 |
| ProjectIdentifier |
string |
否 |
DataWorks 工作空間的名稱。您可以登入 DataWorks 控制台,進入工作空間配置頁面擷取工作空間名稱。 該參數與 ProjectId 參數,二者必須設定其一,用來確定本次 API 呼叫操作的 DataWorks 工作空間。 |
dw_project |
| FileId |
integer |
否 |
檔案的 ID。您可以調用 ListFiles 介面查詢對應檔案的 ID。 |
100000001 |
| NodeId |
integer |
否 |
調度節點的 ID。您可以調用 ListFiles 介面擷取節點 ID。 |
200000001 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| HttpStatusCode |
integer |
HTTP 狀態代碼。 |
200 |
| ErrorMessage |
string |
錯誤資訊。 |
The connection does not exist. |
| RequestId |
string |
請求 ID。用於出現錯誤後排查問題。 |
0000-ABCD-EFG**** |
| ErrorCode |
string |
錯誤碼。 |
Invalid.Tenant.ConnectionNotExists |
| Success |
boolean |
調用是否成功。取值如下:
|
true |
| Data |
object |
檔案的詳情。 |
|
| File |
object |
檔案的基本資料。 |
|
| CommitStatus |
integer |
檔案當前的提交狀態,包括 0(未提交最新的代碼)和 1(已提交最新的代碼)。 |
0 |
| AutoParsing |
boolean |
檔案是否開啟自動解析功能。取值如下:
該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴”選擇“同周期”時的“代碼解析”對應。 |
true |
| Owner |
string |
檔案責任人的阿里雲使用者識別碼。 |
7775674356**** |
| CreateTime |
integer |
檔案建立的時間戳記,單位為毫秒。 |
1593879116000 |
| FileType |
integer |
檔案的代碼類型。檔案類型,不同檔案類型其代碼不同,詳情請參見 DataWorks 節點合集。 |
10 |
| CurrentVersion |
integer |
檔案當前已經提交的最新版本號碼。 |
3 |
| BizId |
integer |
檔案所屬商務程序的 ID。該欄位已廢棄,請使用 BusinessId 欄位。 |
1000001 |
| LastEditUser |
string |
最近一次編輯檔案的阿里雲使用者識別碼。 |
62465892**** |
| FileName |
string |
檔案的名稱。 |
ods_user_info_d |
| ConnectionName |
string |
執行檔案對應的任務時,所使用的資料來源名稱。 |
odps_source |
| UseType |
string |
檔案所屬的功能模組。取值如下:
|
NORMAL |
| FileFolderId |
string |
檔案所屬檔案夾的 ID。 |
2735c2**** |
| ParentId |
integer |
如果當前檔案是組合節點檔案的內部檔案,該欄位標識對應組合節點檔案的 ID。 |
-1 |
| CreateUser |
string |
檔案建立人的阿里雲使用者識別碼。 |
424732**** |
| IsMaxCompute |
boolean |
標識該資源檔是否需要上傳至 MaxCompute。 僅當檔案是 MaxCompute 資源檔時才需要配置該參數。 |
true |
| BusinessId |
integer |
檔案的商務程序 ID。 |
1000001 |
| FileDescription |
string |
檔案的描述資訊。 |
My first DataWorks file |
| DeletedStatus |
string |
檔案的刪除狀態。取值如下:
|
RECYCLE |
| LastEditTime |
integer |
最近一次編輯檔案的時間戳記,單位為毫秒。 |
1593879116000 |
| Content |
string |
檔案的代碼。 |
SHOW TABLES; |
| NodeId |
integer |
提交檔案後,在調度系統產生的調度任務 ID。 |
300001 |
| AdvancedSettings |
string |
任務的進階配置。 該參數與 DataWorks 控制台中,EMR 資料開發工作單位,編輯頁面右側導覽列的“進階設定“對應。 說明
當前 EMR Shell 任務不支援配置進階參數。 各 EMR 任務開發的進階參數說明,請參見 EMR 任務開發。 |
{\"priority\":\"1\",\"ENABLE_SPARKSQL_JDBC\":false,\"FLOW_SKIP_SQL_ANALYZE\":false,\"queue\":\"default\"} |
| FileId |
integer |
檔案的 ID。 |
100000001 |
| NodeConfiguration |
object |
檔案的調度配置。 |
|
| RerunMode |
string |
重跑屬性。取值如下:
該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>重跑屬性”配置內容對應。 |
ALL_ALLOWED |
| SchedulerType |
string |
調度的類型,取值如下:
|
NORMAL |
| Stop |
boolean |
是否暫停調度,取值如下:
該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>調度類型”配置為”暫停調度“時對應。 |
false |
| ParaValue |
string |
調度參數。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>參數”對應。您可以參考調度參數配置。 |
a=x b=y |
| StartEffectDate |
integer |
開始自動調度的毫秒時間戳記。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>生效日期”配置的開始時間的毫秒時間戳記對應。 |
936923400000 |
| EndEffectDate |
integer |
停止自動調度的時間戳記,單位為毫秒。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>生效日期”配置的結束時間的毫秒時間戳記對應。 |
4155787800000 |
| CycleType |
string |
調度周期的類型,包括 NOT_DAY(分鐘、小時)和 DAY(日、周、月)。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>調度周期”對應。 |
DAY |
| DependentNodeIdList |
string |
當 DependentType 參數配置為 USER_DEFINE 時,用於設定當前檔案具體依賴的節點 ID。依賴多個節點時,使用英文逗號(,)分隔。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴”配置為“上一周期”後,依賴項選擇”其他節點“時配置的內容對應。 |
5,10,15,20 |
| ResourceGroupId |
integer |
檔案發布成任務後,任務執行時對應的資源群組。您可以調用 ListResourceGroups 擷取工作空間可用的資源群組列表。 |
375827434852437 |
| DependentType |
string |
依賴上一周期的方式。取值如下:
|
USER_DEFINE |
| AutoRerunTimes |
integer |
出錯自動重跑的次數。 |
3 |
| AutoRerunIntervalMillis |
integer |
出錯自動重跑時間間隔,單位為毫秒。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>時間屬性>出錯自動重跑”的”重跑間隔“配置對應。 控制台中“重跑間隔”的時間單位為分鐘,請在調用時注意轉換時間。 |
120000 |
| CronExpress |
string |
檔案定時調度的 cron 運算式。 |
00 05 00 * * ? |
| InputList |
array<object> |
檔案依賴的上遊檔案輸出。 |
|
|
object |
依賴的上遊檔案輸出資訊。 |
||
| Input |
string |
檔案依賴的上遊檔案的輸出名稱。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴“選擇”同周期“時的”父節點輸出名稱”對應。 |
project.001_out |
| ParseType |
string |
設定檔依賴的方式,取值如下:
|
MANUAL |
| OutputList |
array<object> |
檔案的輸出。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴“選擇”同周期“時的”本節點的輸出名稱”對應。 |
|
|
object |
檔案的輸出資訊。 |
||
| RefTableName |
string |
檔案的輸出值。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴“選擇”同周期“時的“本節點的輸出表”列的值對應。 |
ods_user_info_d |
| Output |
string |
檔案的輸出名稱。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>調度依賴“選擇”同周期“時的“本節點的輸出名稱”列值對應。 |
dw_project.002_out |
| StartImmediately |
boolean |
發布後是否立即啟動。 該參數與 DataWorks 控制台中,EMR Spark Streaming 和 EMR Streaming SQL 資料開發工作單位,編輯頁面右側導覽列的“配置>時間屬性>啟動方式“對應。 |
true |
| InputParameters |
array<object> |
節點上下文輸入參數。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸入參數“對應。 |
|
|
object |
返回結果。 |
||
| ParameterName |
string |
節點上下文輸入參數的參數名稱。在代碼中可以使用${...}方式引用該參數。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸入參數“的”參數名“對應。 |
input |
| ValueSource |
string |
節點上下文輸入參數的取值來源。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸入參數“的”取值來源“對應。 |
project_001.parent_node:outputs |
| OutputParameters |
array<object> |
節點上下文輸出參數。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸出參數“對應。 |
|
|
object |
返回結果。 |
||
| ParameterName |
string |
節點上下文輸出參數的參數名稱。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸出參數“的”參數名“對應。 |
output |
| Value |
string |
節點上下文輸出參數的運算式。 該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸出參數“的”取值“對應。 |
${bizdate} |
| Type |
string |
節點上下文輸出參數運算式的類型。取值如下:
該參數與 DataWorks 控制台中,資料開發工作單位的“調度配置>節點上下文>本節點輸出參數“的”類型“對應。 |
1 |
| Description |
string |
節點上下文輸出的參數描述。 |
It's a context output parameter. |
| ApplyScheduleImmediately |
string |
是否發布後立即生效調度配置 |
true |
| IgnoreParentSkipRunningProperty |
string |
調度配置->上一周期->是否跳過上遊的空跑屬性 |
true |
| Timeout |
integer |
調度配置逾時定義 |
1 |
| ImageId |
string |
自訂鏡像 ID |
m-bp1h4b5a8ogkbll2f3tr |
| ResourceDownloadLink |
object |
資源下載地址 |
|
| downloadLink |
string |
資源下載地址連結 |
http://xx |
樣本
正常返回樣本
JSON格式
{
"HttpStatusCode": 200,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-EFG****",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"File": {
"CommitStatus": 0,
"AutoParsing": true,
"Owner": "7775674356****",
"CreateTime": 1593879116000,
"FileType": 10,
"CurrentVersion": 3,
"BizId": 1000001,
"LastEditUser": "62465892****",
"FileName": "ods_user_info_d",
"ConnectionName": "odps_source",
"UseType": "NORMAL",
"FileFolderId": "2735c2****",
"ParentId": -1,
"CreateUser": "424732****",
"IsMaxCompute": true,
"BusinessId": 1000001,
"FileDescription": "My first DataWorks file",
"DeletedStatus": "RECYCLE",
"LastEditTime": 1593879116000,
"Content": "SHOW TABLES;",
"NodeId": 300001,
"AdvancedSettings": "{\\\"priority\\\":\\\"1\\\",\\\"ENABLE_SPARKSQL_JDBC\\\":false,\\\"FLOW_SKIP_SQL_ANALYZE\\\":false,\\\"queue\\\":\\\"default\\\"}",
"FileId": 100000001
},
"NodeConfiguration": {
"RerunMode": "ALL_ALLOWED",
"SchedulerType": "NORMAL",
"Stop": false,
"ParaValue": "a=x b=y",
"StartEffectDate": 936923400000,
"EndEffectDate": 4155787800000,
"CycleType": "DAY",
"DependentNodeIdList": "5,10,15,20",
"ResourceGroupId": 375827434852437,
"DependentType": "USER_DEFINE",
"AutoRerunTimes": 3,
"AutoRerunIntervalMillis": 120000,
"CronExpress": "00 05 00 * * ?",
"InputList": [
{
"Input": "project.001_out",
"ParseType": "MANUAL"
}
],
"OutputList": [
{
"RefTableName": "ods_user_info_d",
"Output": "dw_project.002_out"
}
],
"StartImmediately": true,
"InputParameters": [
{
"ParameterName": "input",
"ValueSource": "project_001.parent_node:outputs"
}
],
"OutputParameters": [
{
"ParameterName": "output",
"Value": "${bizdate}",
"Type": "1",
"Description": "It's a context output parameter."
}
],
"ApplyScheduleImmediately": "true",
"IgnoreParentSkipRunningProperty": "true",
"Timeout": 1,
"ImageId": "m-bp1h4b5a8ogkbll2f3tr"
},
"ResourceDownloadLink": {
"downloadLink": "http://xx"
}
}
}
錯誤碼
|
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. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | 沒有許可權,請授權 |
| 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。