GetComponent - 获取组件详情

获取组件信息。

接口说明

  1. 需要购买 DataWorks 基础版及以上版本才能使用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ProjectIdlong

DataWorks 工作空间的 ID。您可以登录 DataWorks 管控台,进入工作空间配置页面获取工作空间 ID。该参数与 ProjectIdentifier 参数,二者必须设置其一,用来确定本次 API 调用操作的 DataWorks 工作空间。

10000
ComponentIdstring

组件 ID。

1112312312312

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

Id of the request

0000-ABCD-EFG****
Componentobject

component 模块的 JSON 序列化。

ComponentIdstring

数据集加速组件 ID。如何获取组件 ID,请参见 ListComponents

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

DataWorks 工作空间的 ID。

64623
Namestring

名称

dim_whse_epet_warehouse_jz_storage_stock_lot_relation_id
Ownerstring

任务的责任人的账号 ID。

207316543660665792
CreateTimestring

创建时间。

2017-04-27T05:37:05Z
ModifyTimestring

修改时间(毫秒级时间戳)

2024-01-26T07:44:21Z
Specstring

描述这个工作流的 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" } ] } ] } }
Descriptionstring

描述信息。

None
RegionIdstring

地域信息,通常为服务所在的地域。例如,华东 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": 207316543660665800,
    "CreateTime": "2017-04-27T05:37:05Z",
    "ModifyTime": "2024-01-26T07:44:21Z",
    "Spec": {
      "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": "None",
    "RegionId": "cn-hangzhou"
  }
}

错误码

HTTP status code错误码错误信息
404InvalidComponent.NotFoundThe specified Component does not exist.

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