Creates a node in DataStudio. The information about the node is described by using FlowSpec.
Operation description
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
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. |
23451286945488XXXX |
| Scene |
string |
Yes |
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. |
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": [ { "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. |
AFBB799F-8578-51C5-A766-E922EDB8XXXX |
| Id |
string |
The unique identifier of the Data Studio node. Note
This field is of the Long type in SDK versions prior to 8.0.0, and of the String type in SDK versions 8.0.0 and later. 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. |
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.