All Products
Search
Document Center

DataWorks:GetInstance

Last Updated:Dec 18, 2024

Queries the information about an instance.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdlongYes

The instance ID. You can call the ListInstances operation to query the ID.

1234
ProjectEnvstringYes

The environment of the workspace. Valid values: PROD and DEV.

PROD

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

HttpStatusCodeinteger

The HTTP status code.

200
RequestIdstring

The request ID.

E6F0DBDD-5AD****
ErrorMessagestring

The error message returned when the instance fails to be scheduled.

test
Successboolean

Indicates whether the request was successful.

true
ErrorCodestring

The error code.

0
Dataobject

The details of the instance.

Statusstring

The status of the node that generates the instance. Valid values:

  • NOT_RUN: The node is not run.
  • WAIT_TIME: The node is waiting for its scheduling time to arrive.
  • WAIT_RESOURCE: The node is waiting for resources.
  • RUNNING: The node is running.
  • CHECKING: Data quality is being checked for the node.
  • CHECKING_CONDITION: Branch conditions are being checked for the node.
  • FAILURE: The node fails to run.
  • SUCCESS: The node is successfully run.
NOT_RUN
CycTimelong

The scheduling time of the instance.

1590422400000
BeginRunningTimelong

The time when the instance started to run.

1590416703313
FinishTimelong

The time when the running of the instance was complete.

1590416703313
CreateTimelong

The time when the instance was generated.

1590416703313
DagIdlong

The workflow ID.

338450167
Priorityinteger

The priority of the instance. Valid values: 1, 3, 5, 7, and 8. A greater value indicates a higher priority. Default value: 1.

1
TaskTypestring

The scheduling type of the node that generates the instance. Valid values:

  • NORMAL(0): The node is an auto triggered node. The scheduling system regularly runs the node.
  • MANUAL(1): The node is a manually triggered node. The scheduling system does not regularly run the node.
  • PAUSE(2): The node is a frozen node. The scheduling system regularly runs the node but sets the status of the node to failed when the scheduling system starts to run the node.
  • SKIP(3): The node is a dry-run node. The scheduling system regularly runs the node but sets the status of the node to successful when the scheduling system starts to run the node.
  • SKIP_UNCHOOSE(4): The node is an unselected node in a temporary workflow. This type of node exists only in temporary workflows. The scheduling system sets the status of the node to successful when the scheduling system starts to run the node.
  • SKIP_CYCLE(5): The node is a node that is scheduled by the week or month and is waiting for the scheduling time to arrive. The scheduling system regularly runs the node but sets the status of the node to successful when the scheduling system starts to run the node.
  • CONDITION_UNCHOOSE(6): The node is not selected by its ancestor branch node and is run as a dry-run node.
  • REALTIME_DEPRECATED(7): The node has instances that are generated in real time but deprecated. The scheduling system sets the status of the node to successful.
NORMAL(0)
ParamValuesstring

The parameters related to the node.

bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif
Connectionstring

The connection string.

odps_first
BaselineIdlong

The baseline ID.

123123
DqcTypeinteger

Indicates whether the instance is associated with a monitoring rule in Data Quality. Valid values:

  • 0: The instance is associated with a monitoring rule in Data Quality.
  • 1: The instance is not associated with a monitoring rule in Data Quality.
1
DagTypestring

The type of the workflow. Valid values:

  • DAILY: The workflow is used to run auto triggered nodes.
  • MANUAL: The workflow is used to run manually triggered nodes.
  • SMOKE_TEST: The workflow is used to perform smoke testing.
  • SUPPLY_DATA: The workflow is used to backfill data.
DAILY
BusinessIdlong

The workflow ID.

123
TaskRerunTimeinteger

The number of times the node can be rerun. The value of this parameter can be empty or an integer that is greater than or equal to 0.

  • If the value of this parameter is empty, the number of times that the node can be rerun is not specified.
  • If the value of this parameter is 0, the node cannot be rerun.
  • If the value of this parameter is a positive integer such as n, the node can still be rerun n times. For example, if the value of this parameter is 1, the node can still be rerun once. If the value of this parameter is 2, the node can still be rerun twice.
0
PeriodNumberinteger

The sequence number of the cycle. This parameter indicates the sequence number of the cycle of the instance on the current day.

1
ModifyTimelong

The time when the instance was last modified.

1590416703313
Repeatabilityboolean

Indicates whether the node that generates the instance can be rerun.

true
RepeatIntervallong

The interval at which the node is rerun after the node fails to run. Unit: milliseconds.

60000
InstanceIdlong

The instance ID.

11713307578
BeginWaitResTimelong

The time when the instance started to wait for resources.

1590416703313
RelatedFlowIdlong

The ID of the workflow to which the node belongs.

123123
Bizdatelong

The data timestamp of the instance. In most cases, the value is one day before the time when the instance was run.

1590336000000
NodeNamestring

The name of the node.

kzh
BeginWaitTimeTimelong

The time when the instance started to wait to be scheduled.

1590416703313
DqcDescriptionstring

The table and partition filter expression in Data Quality that are associated with the node.

[{"projectName":"ztjy_dim","tableName":"dim_user_agent_manage_area_a","partition":"ds\u003d$[yyyy-mm-dd-1]"}]
NodeIdlong

The node ID.

33115
CreateUserstring

The creator of the instance.

111
Ownerstring

The owner of the instance.

111

Examples

Sample success responses

JSONformat

{
  "HttpStatusCode": 200,
  "RequestId": "E6F0DBDD-5AD****",
  "ErrorMessage": "test",
  "Success": true,
  "ErrorCode": "0",
  "Data": {
    "Status": "NOT_RUN",
    "CycTime": 1590422400000,
    "BeginRunningTime": 1590416703313,
    "FinishTime": 1590416703313,
    "CreateTime": 1590416703313,
    "DagId": 338450167,
    "Priority": 1,
    "TaskType": "NORMAL(0)",
    "ParamValues": "bizdate=$bizdate tbods=$tbods tbdw=$tbdw tbpmic=$tbpmic tbpidx=$tbpidx tbptcif=$tbptcif",
    "Connection": "odps_first",
    "BaselineId": 123123,
    "DqcType": 1,
    "DagType": "DAILY",
    "BusinessId": 123,
    "TaskRerunTime": 0,
    "PeriodNumber": 1,
    "ModifyTime": 1590416703313,
    "Repeatability": true,
    "RepeatInterval": 60000,
    "InstanceId": 11713307578,
    "BeginWaitResTime": 1590416703313,
    "RelatedFlowId": 123123,
    "Bizdate": 1590336000000,
    "NodeName": "kzh",
    "BeginWaitTimeTime": 1590416703313,
    "DqcDescription": "[{\"projectName\":\"ztjy_dim\",\"tableName\":\"dim_user_agent_manage_area_a\",\"partition\":\"ds\\u003d$[yyyy-mm-dd-1]\"}]",
    "NodeId": 33115,
    "CreateUser": "111",
    "Owner": "111"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history