全部產品
Search
文件中心

DataWorks:GetComponent - 擷取組件詳情

更新時間:Mar 21, 2026

擷取組件資訊。

介面說明

  1. 需要購買 DataWorks 基礎版及以上版本才能使用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

ProjectId

integer

DataWorks 工作空間的 ID。您可以登入 DataWorks 管控台,進入工作空間配置頁面擷取工作空間 ID。該參數與 ProjectIdentifier 參數,二者必須設定其一,用來確定本次 API 呼叫操作的 DataWorks 工作空間。

10000

ComponentId

string

組件 ID。

1112312312312

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

Id of the request

0000-ABCD-EFG****

Component

object

component 模組的 JSON 序列化。

ComponentId

string

資料集加速組件 ID。如何擷取組件 ID,請參見 ListComponents

43cd873b-235c-44f8-be07-e4d4cf7e73b0

ProjectId

integer

DataWorks 工作空間的 ID。

64623

Name

string

名稱

dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id

Owner

string

任務的責任人的帳號 ID。

207316543660665792

CreateTime

string

建立時間。

2017-04-27T05:37:05Z

ModifyTime

string

修改時間(毫秒級時間戳記)

2024-01-26T07:44:21Z

Spec

string

描述這個工作流程的 FlowSpec 資訊,具體規範詳見 FlowSpec

{ "kind": "Component", "name": "com1", "spec": { "components": [ { "name": "test11", "id": "8196828925037*****", "owner": "054664", "description": "", "script": { "language": "odps-sql", "path": "test11", "content": "select '@@{bizdate}', '@@{my_input_table}'", "runtime": { "command": "SQL_COMPONENT" } }, "inputs": [ { "name": "bizdate", "type": "string" }, { "name": "my_input_table", "type": "string" } ], "outputs": [ { "name": "my_output_table1", "type": "string" } ] } ] } }

Description

string

描述資訊。

None

RegionId

string

地區資訊,通常為服務所在的地區。例如,華東 2(上海)為 cn-shanghai,華北 3(張家口)為 cn-zhangjiakou。您無需填寫 RegionId,會根據調用的 Endpoint 自動解析。

cn-hangzhou

樣本

正常返回樣本

JSON格式

{
  "RequestId": "0000-ABCD-EFG****",
  "Component": {
    "ComponentId": "43cd873b-235c-44f8-be07-e4d4cf7e73b0",
    "ProjectId": 64623,
    "Name": "dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id",
    "Owner": "207316543660665792",
    "CreateTime": "2017-04-27T05:37:05Z",
    "ModifyTime": "2024-01-26T07:44:21Z",
    "Spec": "{\n    \"kind\": \"Component\",\n    \"name\": \"com1\",\n    \"spec\": {\n        \"components\": [\n            {\n                \"name\": \"test11\",\n                \"id\": \"8196828925037*****\",\n                \"owner\": \"054664\",\n                \"description\": \"\",\n                \"script\": {\n                    \"language\": \"odps-sql\",\n                    \"path\": \"test11\",\n                    \"content\": \"select '@@{bizdate}', '@@{my_input_table}'\",\n                    \"runtime\": {\n                        \"command\": \"SQL_COMPONENT\"\n                    }\n                },\n                \"inputs\": [\n                    {\n                        \"name\": \"bizdate\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"my_input_table\",\n                        \"type\": \"string\"\n                    }\n                ],\n                \"outputs\": [\n                    {\n                        \"name\": \"my_output_table1\",\n                        \"type\": \"string\"\n                    }\n                ]\n            }\n        ]\n    }\n}",
    "Description": "None",
    "RegionId": "cn-hangzhou"
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

404 InvalidComponent.NotFound The specified Component does not exist.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情