Queries the configurations of a node based on the node ID in a task flow, including the time variables of the task.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | GetTask |
The operation that you want to perform. Set the value to GetTask. |
| Tid | Long | No | 3*** |
The ID of the tenant. Note The ID of the tenant is displayed when you move the pointer over the profile picture
in the upper-right corner of the Data Management (DMS) console. For more information,
see the "View information about the current tenant" section of the Manage DMS tenants topic.
|
| NodeId | Long | Yes | 51*** |
The ID of the node. You can call the GetTaskInstanceRelation operation to query the node ID. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 7838266C-E17B-58F4-B072-4DC356B58258 |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
| ErrorCode | String | UnknownError |
The error code returned if the request failed. |
| ErrorMessage | String | UnknownError |
The error message returned if the request failed. |
| Success | Boolean | true |
Indicates whether the request was successful. Valid values:
|
| Task | Object |
The task in a task flow. |
|
| DagId | Long | 7321 |
The ID of the task flow where the node resides. |
| NodeName | String | Cross-database Spark SQL-1 |
The name of the node. |
| NodeType | String | SPARK_SQL |
The type of the node. For more information about the valid values for this parameter, see NodeType parameter. |
| NodeContent | String | {\"dbList\":[{\"instanceId\":177****}" } |
The configuration for the node. |
| TimeVariables | String | {\"variables\":[{\"name\":\"Today\",\"pattern\":\"yyyy-MM-dd|+1d\"}]} |
The time variables for the node. |
| NodeConfig | String | {\"dbId\":39****,\"dbType\":\"mysql\",\"locale\":\"zh\",\"sql\":\"/* Make sure that the following SQL statements meet your change requirements before submitting them for execution. */\\n\\nCREATE TABLE IF NOT EXISTS `momo_weekGather` (\\n\\t`id` bigint AUTO_INCREMENT DEFAULT '0',\\n\\t`age` bit NULL,\\n\\t`action` varchar(150) NULL,\\n\\t`elapse_time` datetime NULL,\\n\\tPRIMARY KEY (`id`)\\n) ENGINE=InnoDB\\nDEFAULT CHARACTER SET=utf8;\"} |
The advanced configuration for the node. |
| NodeOutput | String | { "outputs":[ "extractMethod":"json" , "variableName":"var", "description":"demo desc" } ] } |
The output variable of the node. Only some types of nodes have this parameter. |
| GraphParam | String | {"{\"x\":0,\"y\":0,\"layoutType\":\"Horizontal\"}", "id": 51***} |
The position of the node on the Directed Acyclic Graph (DAG). |
TimeVariables is a JSON string. Example:
Json
{
"variables":[
{
"name":"var",// Variable name
/*
Variable format
As shown in the example, the date can have one or more offsets, including minutes (m), hours (h), days (d), weeks (w), months (M), or years (y). The offsets are optional, and you can specify the offsets in a different order than described here.
*/
"pattern":"yyyy-MM-dd|+0d"
},
{
"name":"test",
"pattern":"yyyy-MM-dd|+0d"
}
]
}
Examples
Sample requests
http(s)://dms-enterprise.aliyuncs.com/?Action=GetTask
&NodeId=51***
&Common request parameters
Sample responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetTaskResponse>
<Task>
<NodeName>Cross-database Spark SQL-1</NodeName>
<NodeType>SPARK_SQL</NodeType>
<DagId>73***</DagId>
<NodeContent>{"dbId":39****,"dbType":"mysql","locale":"zh","sql":"\n\nCREATE TABLE IF NOT EXISTS `momo_weekGather` (\n\t`id` bigint AUTO_INCREMENT DEFAULT '0',\n\t`age` bit NULL,\n\t`action` varchar(150) NULL,\n\t`elapse_time` datetime NULL,\n\tPRIMARY KEY (`id`)\n) ENGINE=InnoDB\nDEFAULT CHARACTER SET=utf8;"}</NodeContent>
<NodeConfig>{"rerun":{"rerunEnable":false}}</NodeConfig>
<GraphParam>{"x":0,"y":0,"layoutType":"Horizontal"}</GraphParam>
</Task>
<RequestId>7838266C-E17B-58F4-B072-4DC356B58258</RequestId>
<Success>true</Success>
</GetTaskResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Task" : {
"NodeName" : "Cross-database Spark SQL-1",
"NodeType" : "SPARK_SQL",
"DagId" : "73***",
"NodeContent" : "{\"dbId\":39****,\"dbType\":\"mysql\",\"locale\":\"zh\",\"sql\":\"\\n\\nCREATE TABLE IF NOT EXISTS `momo_weekGather` (\\n\\t`id` bigint AUTO_INCREMENT DEFAULT '0',\\n\\t`age` bit NULL,\\n\\t`action` varchar(150) NULL,\\n\\t`elapse_time` datetime NULL,\\n\\tPRIMARY KEY (`id`)\\n) ENGINE=InnoDB\\nDEFAULT CHARACTER SET=utf8;\"}",
"NodeConfig" : "{\"rerun\":{\"rerunEnable\":false}}",
"GraphParam" : "{\"x\":0,\"y\":0,\"layoutType\":\"Horizontal\"}"
},
"RequestId" : "7838266C-E17B-58F4-B072-4DC356B58258",
"Success" : true
}
Error codes
For a list of error codes, see Service error codes.