All Products
Search
Document Center

DataWorks:CreateNode

Last Updated:Sep 03, 2026

Creates a data development node in the new version of DataStudio.

Operation description

Important This operation does not support batch operations. If more than one node is defined in FlowSpec, all nodes after the first one are ignored.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the ID.

This parameter specifies the DataWorks workspace for this API call operation.

123456

ContainerId

string

No

The unique identifier of a container in which you want to create the node. The container can be a workflow or a container node. Specify this parameter when you need to create the node inside a container.

Important If this parameter is specified, the path field defined in FlowSpec becomes invalid.
Important This field was of the Long type in SDK versions earlier than 8.0.0 and is of the String type in SDK 8.0.0 and later. This change does not affect normal SDK usage, and the parameter is still returned in the type defined in the SDK. Only when you upgrade across SDK version 8.0.0, the type change may cause project compilation failures, and you need to manually correct the data type.

23451286945488XXXX

Scene

string

Yes

The scenario in which the node is created. This parameter determines whether the node is created in the manual node area or the data development area. DATAWORKS_MANUAL_WORKFLOW can be used only when ContainerId is specified and the container is a manual workflow.

Valid values:

  • DATAWORKS_PROJECT: project directory.

  • DATAWORKS_MANUAL_WORKFLOW: manual workflow.

  • DATAWORKS_MANUAL_TASK: manual task.

DATAWORKS_PROJECT

Spec

string

Yes

The FlowSpec information that describes the node. For more information about the specification, see FlowSpec.

Note

How to quickly obtain a FlowSpec template?

  • In DataStudio, open a node, click Versions on the right side, view the latest version, and then view the scheduling configuration. This provides the FlowSpec description for the current node. You can use the FlowSpec description in the version to quickly build a template that meets your requirements.

Note

How to specify the node content?

  • Specify the node content in the $.spec.nodes[*].script.content field.

Note

How to configure the content of a batch synchronization node?

{ "version": "1.1.0", "kind": "Node", "spec": { "nodes": [ { "recurrence": "Normal", "timeout": 0, "instanceMode": "T+1", "rerunMode": "Allowed", "rerunTimes": 3, "rerunInterval": 180000, "datasource": { "name": "odps_test" }, "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": "project_root", "artifactType": "NodeOutput" } ] }, "outputs": { "nodeOutputs": [ { "data": "output_data", "artifactType": "NodeOutput", "refTableName": "odpsSQL_Test" } ] } } ] } }

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID. You can use this ID to locate logs and troubleshoot issues.

AFBB799F-8578-51C5-A766-E922EDB8XXXX

Id

string

The unique identifier of the data development node.

Important This field was of the Long type in SDK versions earlier than 8.0.0 and is of the String type in SDK 8.0.0 and later. This change does not affect normal SDK usage, and the parameter is still returned in the type defined in the SDK. Only when you upgrade across SDK version 8.0.0, the type change may cause project compilation failures, and you need to manually correct the data type.

860438872620113XXXX

Examples

Success response

JSON format

{
  "RequestId": "AFBB799F-8578-51C5-A766-E922EDB8XXXX",
  "Id": "860438872620113XXXX"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.