全部產品
Search
文件中心

DataWorks:CreateComponent - 建立組件

更新時間:Mar 21, 2026

建立組件。

介面說明

重要 該介面目前不支援大量操作,參數中填寫多個發布實體時,除第一個以外的部分會被直接忽略。

調試

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

調試

授權資訊

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

請求參數

名稱

類型

必填

描述

樣本值

ProjectId

integer

資料來源所在的 DataWorks 工作空間 ID。您可以通過 ListProjects 介面擷取工作空間 ID。

10000

Spec

string

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

{ "kind": "Component", "name": "com1", "spec": { "components": [ { "name": "test11", "id": "1234", "owner": "1234456", "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" } ] } ] } }

ClientToken

string

保留欄位。

1AFAE64E-D1BE-432B-A9****

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

Id of the request

adssd****

ComponentId

string

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

123123123123123

樣本

正常返回樣本

JSON格式

{
  "RequestId": "adssd****",
  "ComponentId": "123123123123123"
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情