Creates a node in DataStudio. The information about the node is described by using FlowSpec.
Operation description
Debugging
Authorization information
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| ProjectId | string | Yes | The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to query the ID. You must configure this parameter to specify the DataWorks workspace to which the API operation is applied. | 123456 |
| ContainerId | string | No | Specify this parameter if you want to create the node inside a container. This parameter represents the unique identifier of the container, which can be a workflow or a container node. Note
If this parameter is specified, the path field defined in FlowSpec is ignored.
Note
Prior to SDK version 8.0.0, this field is of type Long. In SDK version 8.0.0 and later, it is of type String. This change does not affect the normal use of the SDK. The parameter is returned based on the type defined in the SDK. Compilation failures caused by the type change may occur only when you upgrade the SDK across version 8.0.0. In this case, you must manually update the data type.
| a7ef0634-20ec-4a7c-a214-54020f91XXXX |
| Scene | string | Yes | The scenario for node creation. This determines whether the node is created in the manual task pane or the Data Studio pane. DataworksManualWorkflow is valid only when ContainerId is specified and the container is a manual workflow. Valid values:
| DATAWORKS_PROJECT |
| Spec | string | Yes | The FlowSpec information that describes the node. For more information, see FlowSpec . Note
How do I quickly obtain a FlowSpec template?
Note
How do I configure the node content?
Note
How do I configure a batch synchronization node?
| { "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" } ] } ] } } |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "AFBB799F-8578-51C5-A766-E922EDB8XXXX",
"Id": "860438872620113XXXX"
}Error codes
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2025-01-13 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
| 2025-01-13 | The response structure of the API has changed | View Change Details |
