All Products
Search
Document Center

DataWorks:ListDataQualityEvaluationTaskInstances

Last Updated:Dec 23, 2024

Queries a list of instances generated by a data quality monitoring task by page.

Operation description

This API operation is available for all DataWorks editions.

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
ProjectIdlongYes

The DataWorks workspace ID.

100
DataQualityEvaluationTaskIdlongNo

The ID of the data quality monitoring task.

10000
TableGuidstringNo

The ID of the table in Data Map.

odps.unit_test.tb_unit_test
CreateTimeFromlongNo

The earliest start time at which the instances are generated.

1710239005403
CreateTimeTolongNo

The latest start time at which the instances are generated.

1710239005403
BizdateFromstringNo

The start time of the data quality monitoring task.

2024-04-01
BizdateTostringNo

The end time of the data quality monitoring task.

2024-05-01
TriggerClientIdstringNo

The ID of the instance that is generated by the task.

1001
TriggerClientstringNo

The name of the trigger module of the instance.

CWF2
PageSizeintegerNo

The number of entries per page. Default value: 10.

10
PageNumberintegerNo

The page number. Default value: 1.

1

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

691CA452-D37A-4ED0-9441
PagingInfoobject

The pagination information.

PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountinteger

The total number of entries returned.

294
DataQualityEvaluationTaskInstancesarray<object>

The instances generated by the task.

DataQualityEvaluationTaskInstanceobject
Idlong

The ID of the instance.

10001
CreateTimelong

The time at which the instance was generated.

1710239005403
FinishTimelong

The time at which the instance finished running.

1710239005403
Statusstring

The status of the instance. Valid values:

  • Running
  • Error
  • Passed
  • Warned
  • Critical
Critical
Parametersstring

The parameters configured for the instance.

{ "bizdate": "20240517", "triggerTime": "1710239005403" }
TriggerContextstring

The information about the trigger module of the instance.

{ "TriggerClientId": 10001, "TriggerClient": "CWF2" }
ProjectIdlong

The DataWorks workspace ID.

100
Taskobject

The snapshot of the configurations for the task when the task starts.

Idlong

The task ID.

10001
RegionIdstring

The region ID.

cn-shanghai
Descriptionstring

The description of the task.

This is a daily run data quality evaluation plan.
ProjectIdlong

The workspace ID.

100
Targetobject

The monitored object of the task.

Typestring

The type of the monitored object. Valid values:

  • Table
Table
DatabaseTypestring

The type of the database to which the table belongs. Valid values:

  • maxcompute
  • emr
  • cdh
  • hologres
  • analyticdb_for_postgresql
  • analyticdb_for_mysql
  • starrocks
maxcompute
TableGuidstring

The ID of the table in Data Map.

odps.unit_test.tb_unit_test
PartitionSpecstring

The configuration of the partitioned table.

ds=$[yyyymmdd-1]
Triggerobject

The trigger configuration of the task.

Typestring

The trigger condition of the task. Valid values:

  • ByScheduledTaskInstance. The value indicates that the task is triggered when the instance of an auto triggered node is successfully run.
ByScheduledTaskInstance
TaskIdsarray

The IDs of the auto triggered nodes of which the instances are successfully run.

TaskIdlong

The ID of the auto triggered node.

10000
RuntimeConfstring

The configuration of the data source. The value of the queue field is default, and that of the sqlEngine field can be set to SPARK_SQL, KYUUBI, PRESTO_SQL, or HIVE_SQL. The value default indicates the YARN queue for E-MapReduce (EMR) tasks.

{ "queue": "default", "sqlEngine": "SPARK-SQL" }
Hooksarray<object>

The callback configurations of the task during the instance lifecycle. Blocking an auto triggered node is a type of callback event. Only this type is supported.

Hookobject
Typestring

The type of the callback event. Valid values:

  • BlockTaskInstance. The value indicates that an auto triggered node is blocked.
BlockTaskInstance
Conditionstring

The trigger configuration of the callback event.

${severity} == "High" AND ${status} == "Critical"
Notificationsobject

The configurations for alert notifications.

Conditionstring

The trigger condition of the alert notification.

${severity} == "High"
Notificationsarray<object>

The configurations for the alert notification.

Notificationsobject
NofiticationReceiversarray<object>

The alert recipients.

NotificationReceiverobject
ReceiverTypestring

The type of the alert recipient. Valid values:

  • AliUid: Alibaba Cloud account ID
  • WebhookUrl: URL of a custom webhook
  • DingdingUrl: DingTalk chatbot URL
  • FeishuUrl: Lark chatbot URL
  • WeixinUrl: WeCom chatbot URL
AliUid
Extensionstring

The extended information in the JSON format. For example, the DingTalk chatbot can remind all members in a DingTalk group by using the at sign (@).

{"atAll":"true"}
ReceiverValuesarray

The alert recipients.

ReceiverValuestring

The alert recipient.

10000001
NotificationChannelsarray<object>

The alert notification methods.

NotificationChannelobject
Channelsarray

The alert notification methods.

Channelstring
  • Mail
  • Sms
  • Phone
  • Feishu
  • Weixin: WeCom notification
  • Dingding
  • Webhook
Mail
Namestring

The name of the task.

Examples

Sample success responses

JSONformat

{
  "RequestId": "691CA452-D37A-4ED0-9441",
  "PagingInfo": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 294,
    "DataQualityEvaluationTaskInstances": [
      {
        "Id": 10001,
        "CreateTime": 1710239005403,
        "FinishTime": 1710239005403,
        "Status": "Critical",
        "Parameters": "{\n  \"bizdate\": \"20240517\",\n  \"triggerTime\": \"1710239005403\"\n}",
        "TriggerContext": "{\n  \"TriggerClientId\": 10001,\n  \"TriggerClient\": \"CWF2\"\n}",
        "ProjectId": 100,
        "Task": {
          "Id": 10001,
          "RegionId": "cn-shanghai",
          "Description": "This is a daily run data quality evaluation plan.",
          "ProjectId": 100,
          "Target": {
            "Type": "Table",
            "DatabaseType": "maxcompute",
            "TableGuid": "odps.unit_test.tb_unit_test",
            "PartitionSpec": "ds=$[yyyymmdd-1]"
          },
          "Trigger": {
            "Type": "ByScheduledTaskInstance",
            "TaskIds": [
              10000
            ]
          },
          "RuntimeConf": "{ \"queue\": \"default\", \"sqlEngine\": \"SPARK-SQL\" }",
          "Hooks": [
            {
              "Type": "BlockTaskInstance",
              "Condition": "${severity} == \"High\" AND ${status} == \"Critical\""
            }
          ],
          "Notifications": {
            "Condition": "${severity} == \"High\"",
            "Notifications": [
              {
                "NofiticationReceivers": [
                  {
                    "ReceiverType": "AliUid",
                    "Extension": "{\"atAll\":\"true\"}",
                    "ReceiverValues": [
                      "10000001"
                    ]
                  }
                ],
                "NotificationChannels": [
                  {
                    "Channels": [
                      "Mail"
                    ]
                  }
                ]
              }
            ]
          },
          "Name": ""
        }
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-12-19The response structure of the API has changedView Change Details
2024-11-06The response structure of the API has changedView Change Details