Retrieves the details of a specified task instance.
Operation description
You must purchase DataWorks Basic Edition or later to use this feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
Yes |
The unique identifier of the task instance. |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| RequestId |
string |
The ID of the request. You can use the ID to locate logs and troubleshoot issues. |
22C97E95-F023-56B5-8852-B1A77**** |
| TaskInstance |
object |
The details of the task instance. |
|
| TaskId |
integer |
The ID of the task. |
1234 |
| TaskType |
string |
The type of the task. |
ODPS_SQL |
| TaskName |
string |
The name of the task. |
SQL node |
| Description |
string |
The description. |
test |
| WorkflowId |
integer |
The ID of the workflow to which the task instance belongs. |
1234 |
| WorkflowName |
string |
The name of the workflow to which the task instance belongs. |
Test workflow |
| TriggerType |
string |
The trigger type. You can obtain the trigger type from the Trigger.Type response parameter of the GetTask operation. Valid values:
|
Scheduler |
| TriggerRecurrence |
string |
The run mode upon trigger. This parameter takes effect only when TriggerType is set to Scheduler. Valid values:
|
Normal |
| WorkflowInstanceId |
integer |
The ID of the workflow instance to which the task instance belongs. |
1234 |
| WorkflowInstanceType |
string |
The type of the workflow instance to which the task instance belongs. Valid values:
|
Normal |
| UnifiedWorkflowInstanceId |
integer |
The unified workflow instance ID. The value of this field is the same for all task instances within a specific business date under a single trigger. |
1234 |
| Timeout |
integer |
The timeout period for task execution, in seconds. Note: The scheduling system rounds the configured value to the nearest hour. |
3600 |
| RerunMode |
string |
The configuration that specifies whether the task can be rerun. Valid values:
|
AllAllowed |
| RunNumber |
integer |
The current number of runs. Default value: 1. |
1 |
| PeriodNumber |
integer |
The period number. This indicates the sequence of the execution cycle for the task instance on the current day. |
1 |
| BaselineId |
integer |
The baseline ID. |
1234 |
| Priority |
integer |
The execution priority of the task. Valid values: 1 to 8. A larger value indicates a higher priority. Default value: 1. |
1 |
| Script |
object |
The information about the execution script. |
|
| Content |
string |
The content of the script. |
echo "helloWorld" |
| Parameters |
string |
The list of script parameters. |
para1=$bizdate |
| RuntimeResource |
object |
The information about the resource group associated with the instance. |
|
| ResourceGroupId |
string |
The identifier of the scheduling resource group configured for task execution. |
S_res_group_524258031846018_1684XXXXXXXXX |
| Image |
string |
The ID of the image configured for task execution. |
i-xxxxxx |
| Cu |
string |
The compute unit (CU) consumption configured for task execution. |
0.25 |
| Runtime |
object |
The runtime information of the instance. |
|
| ProcessId |
string |
The unique ID of the execution process. |
T3_123 |
| Gateway |
string |
The machine on which the task is executed. |
cn-shanghai.1.2 |
| DataSource |
object |
The information about the data source associated with the instance. |
|
| Name |
string |
The name of the data source. |
mysql_test |
| Inputs |
object |
The input information. |
|
| Variables |
array<object> |
The list of variable definitions. |
|
|
object |
The list of variable definitions. |
||
| Name |
string |
The name of the variable. |
Key1 |
| Type |
string |
The type of the variable. Valid values:
|
Constant |
| Value |
string |
The value of the variable. |
Value1 |
| Outputs |
object |
The output information. |
|
| TaskOutputs |
array<object> |
The list of task output definitions. |
|
|
object |
The list of task output definitions. |
||
| Output |
string |
The output identifier. |
pre.odps_sql_demo_0 |
| Variables |
array<object> |
The list of variable definitions. |
|
|
object |
The list of variable definitions. |
||
| Name |
string |
The name of the variable. |
key1 |
| Type |
string |
The type of the variable. Valid values:
|
Constant |
| Value |
string |
The value of the variable. |
value1 |
| Tags |
array<object> |
The list of task tags. |
|
|
object |
The list of task tags. |
||
| Key |
string |
The tag key. |
key1 |
| Value |
string |
The tag value. |
value1 |
| Status |
string |
The running status of the instance. Valid values:
|
Success |
| TriggerTime |
integer |
The scheduled trigger time. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| Bizdate |
integer |
The business date. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| StartedTime |
integer |
The start time. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| FinishedTime |
integer |
The completion time. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| Id |
integer |
The unique identifier of the task instance. |
1234 |
| ProjectId |
integer |
The project ID. |
100 |
| ProjectEnv |
string |
The project environment. Valid values:
|
Prod |
| Owner |
string |
The account ID of the task owner. |
1000 |
| CreateTime |
integer |
The creation time. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| ModifyTime |
integer |
The update time. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| CreateUser |
string |
The account ID of the user who created the instance. |
1000 |
| ModifyUser |
string |
The account ID of the user who updated the instance. |
1000 |
| WaitingResourceTime |
integer |
The time when the instance starts waiting for resources. |
1710239005403 |
| WaitingTriggerTime |
integer |
The time when the instance starts waiting for the scheduled trigger. The value is a 13-digit UNIX timestamp in milliseconds. |
1710239005403 |
| OperationType |
string |
The type of the latest operation on the instance. |
TriggerDqc |
Examples
Success response
JSON format
{
"RequestId": "22C97E95-F023-56B5-8852-B1A77****",
"TaskInstance": {
"TaskId": 1234,
"TaskType": "ODPS_SQL",
"TaskName": "SQL node\n",
"Description": "test",
"WorkflowId": 1234,
"WorkflowName": "Test workflow",
"TriggerType": "Scheduler",
"TriggerRecurrence": "Normal",
"WorkflowInstanceId": 1234,
"WorkflowInstanceType": "Normal",
"UnifiedWorkflowInstanceId": 1234,
"Timeout": 3600,
"RerunMode": "AllAllowed",
"RunNumber": 1,
"PeriodNumber": 1,
"BaselineId": 1234,
"Priority": 1,
"Script": {
"Content": "echo \"helloWorld\"",
"Parameters": "para1=$bizdate"
},
"RuntimeResource": {
"ResourceGroupId": "S_res_group_524258031846018_1684XXXXXXXXX",
"Image": "i-xxxxxx",
"Cu": "0.25"
},
"Runtime": {
"ProcessId": "T3_123",
"Gateway": "cn-shanghai.1.2"
},
"DataSource": {
"Name": "mysql_test"
},
"Inputs": {
"Variables": [
{
"Name": "Key1",
"Type": "Constant",
"Value": "Value1"
}
]
},
"Outputs": {
"TaskOutputs": [
{
"Output": "pre.odps_sql_demo_0"
}
],
"Variables": [
{
"Name": "key1",
"Type": "Constant",
"Value": "value1"
}
]
},
"Tags": [
{
"Key": "key1",
"Value": "value1"
}
],
"Status": "Success",
"TriggerTime": 1710239005403,
"Bizdate": 1710239005403,
"StartedTime": 1710239005403,
"FinishedTime": 1710239005403,
"Id": 1234,
"ProjectId": 100,
"ProjectEnv": "Prod",
"Owner": "1000",
"CreateTime": 1710239005403,
"ModifyTime": 1710239005403,
"CreateUser": "1000",
"ModifyUser": "1000",
"WaitingResourceTime": 1710239005403,
"WaitingTriggerTime": 1710239005403,
"OperationType": "TriggerDqc"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.