GetComponent - 获取组件详情

更新时间:
复制 MD 格式

获取组件信息。

接口说明

  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.

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情