UpdateNode - 更新数据开发节点信息

调用此接口,可以更新数据开发节点信息。更新通过增量更新的方式进行,更新的信息通过FlowSpec进行描述。

调试

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

授权信息

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

请求参数

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

DataWorks 工作空间的 ID,您可以登录 DataWorks 控制台,进入工作空间管理页面查看 ID。

10000
Idlong

数据开发节点的唯一标识符

860438872620113XXXX
Specstring

{ "title": "CycleWorkflow Schema", "description": "定义周期性工作流及其节点配置的 JSON Schema", "type": "object", "required": [ "version", "kind", "spec" ], "properties": { "version": { "type": "string", "const": "1.1.0", "description": "Schema 版本号,当前固定值 1.1.0" }, "kind": { "type": "string", "enum": [ "Workflow", "Node" ], "description": "资源类型,标识工作流的具体类型" }, "spec": { "type": "object", "description": "工作流核心配置规范", "required": [ "nodes" ], "properties": { "nodes": { "type": "array", "description": "工作流节点列表", "items": { "type": "object", "required": [ "name", "script" ], "properties": { "recurrence": { "type": "string", "enum": [ "Normal", "Pause", "Skip", "NoneAuto" ], "description": "节点执行策略:Normal-正常执行, Pause-暂停执行, Skip-跳过执行, NoneAuto-非自动执行" }, "id": { "type": "string", "description": "节点唯一标识符" }, "timeout": { "type": "integer", "minimum": 0, "description": "执行超时时间(单位:秒)" }, "instanceMode": { "type": "string", "enum": [ "T+1", "Immediately" ], "description": "实例生成模式:T+1-次日生成, Immediately-立即生成" }, "rerunMode": { "type": "string", "enum": [ "Allowed", "Denied", "FailureAllowed" ], "description": "重跑策略:Allowed-允许重跑, Denied-禁止重跑, FailureAllowed-失败时允许重跑" }, "rerunTimes": { "type": "integer", "minimum": 0, "description": "最大重跑次数" }, "rerunInterval": { "type": "integer", "minimum": 0, "description": "重跑间隔时间(单位:秒)" }, "datasource": { "type": "object", "description": "数据源配置", "required": [ "name", "type" ], "properties": { "name": { "type": "string", "description": "数据源名称" }, "type": { "type": "string", "enum": [ "odps" ], "description": "数据源类型(当前仅支持 odps)" } } }, "script": { "type": "object", "description": "节点执行脚本配置", "required": [ "path", "runtime" ], "properties": { "language": { "type": "string", "description": "脚本语言类型" }, "path": { "type": "string", "description": "脚本存储路径,末尾与节点名称相同,不需要有后缀" }, "runtime": { "type": "object", "description": "运行时环境配置", "required": [ "command" ], "properties": { "command": { "type": "string", "enum": [ "ODPS_SQL" ], "description": "执行命令" }, "cu": { "type": "string", "description": "计算资源单位配置" } } } } }, "trigger": { "type": "object", "description": "节点触发策略配置", "required": [ "type" ], "properties": { "type": { "type": "string", "enum": [ "Scheduler", "Manual", "Streaming", "None" ], "description": "触发类型:Scheduler-定时调度, Manual-手动触发, Streaming-流式触发, None-无触发" }, "cron": { "type": "string", "description": "Cron 表达式(仅适用于 Scheduler 类型)" }, "startTime": { "type": "string", "format": "yyyy-MM-dd hh:mm:ss", "description": "调度开始时间" }, "endTime": { "type": "string", "format": "yyyy-MM-dd hh:mm:ss", "description": "调度结束时间" } } }, "runtimeResource": { "type": "object", "description": "运行时资源配置", "required": [ "resourceGroup" ], "properties": { "resourceGroup": { "type": "string", "description": "资源组名称" } } }, "name": { "type": "string", "description": "节点名称" }, "owner": { "type": "string", "description": "节点负责人" }, "inputs": { "type": "object", "description": "节点输入配置", "properties": { "nodeOutputs": { "type": "array", "description": "输入依赖列表", "items": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "string", "description": "输入依赖标识" }, "refTableName": { "type": "string", "description": "关联数据表名称(当 artifactType 为 Table 时必填)" }, "isDefault": { "type": "boolean", "description": "是否默认输入项" } } } } } }, "outputs": { "type": "object", "description": "节点输入配置", "properties": { "nodeOutputs": { "type": "array", "description": "输入依赖列表", "items": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "string", "description": "输入依赖标识" }, "refTableName": { "type": "string", "description": "关联数据表名称(当 artifactType 为 Table 时必填)" }, "isDefault": { "type": "boolean", "description": "是否默认输入项" } } } } } } } } } } } } }

{ "version": "1.1.0", "kind": "Node", "spec": { "nodes": [ { "id": "860438872620113XXXX", "recurrence": "Normal", "timeout": 0, "instanceMode": "T+1", "rerunMode": "Allowed", "rerunTimes": 3, "rerunInterval": 180000, "datasource": { "name": "odps_test", "type": "odps" }, "script": { "path": "XX/OpenAPI_Test/odpsSQL_Test", "runtime": { "command": "ODPS_SQL" }, "content": "select now();" }, "trigger": { "type": "Scheduler", "cron": "00 00 00 * * ?", "startTime": "1970-01-01 00:00:00", "endTime": "9999-01-01 00:00:00", "timezone": "Asia/Shanghai", "delaySeconds": 0 }, "runtimeResource": { "resourceGroup": "S_res_group_XXXX_XXXX" }, "name": "odpsSQL_Test", "inputs": { "nodeOutputs": [ { "data": "lwttest_standard_root", "artifactType": "NodeOutput" } ] }, "outputs": { "nodeOutputs": [ { "data": "output_data", "artifactType": "NodeOutput", "refTableName": "odpsSQL_Test" } ] } } ], "flow": [ { "nodeId": "860438872620113XXXX", "depends": [ { "type": "Normal", "output": "project_root" } ] } ] } }

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

本次调用的唯一 ID。出现错误后,您可以根据该 ID 排查问题。

99EBE7CF-69C0-5089-BE3E-79563C31****
Successboolean

调用是否成功。

  • true:调用成功

  • false:调用失败

true

示例

正常返回示例

JSON格式

{
  "RequestId": "99EBE7CF-69C0-5089-BE3E-79563C31****",
  "Success": true
}

错误码

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

变更历史

变更时间变更内容概要操作
2025-01-13API 内部配置变更,不影响调用查看变更详情