All Products
Search
Document Center

DataWorks:ListDataQualityEvaluationTasks

Last Updated:Dec 23, 2024

Queries a list of data quality monitoring tasks 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
TableGuidstringNo

The ID of the table in Data Map.

odps.unit_test.tb_unit_test
NamestringNo

The name of the data quality monitoring task. Fuzzy match is supported.

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.

TotalCountstring

The total number of entries returned.

131
PageSizestring

The number of entries per page.

10
PageNumberstring

The page number.

1
DataQualityEvaluationTasksarray<object>

The data quality monitoring tasks.

DataQualityEvaluationTaskobject
Idlong

The ID of the data quality monitoring task.

10001
Namestring

The name of the data quality monitoring task. The name can be up to 255 characters in length and can contain digits, letters, and punctuation marks.

Descriptionstring

The description of the data quality monitoring task. The description can be up to 65,535 characters in length.

This is a daily run data quality evaluation plan
ProjectIdlong

The DataWorks 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. This parameter takes effect only if the Type parameter is set to ByScheduledTaskInstance.

TaskIdlong

The ID of the auto triggered node.

10001
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

The callback configuration of the task.

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.

Notificationobject

The configuration for the alert notification.

NotificationChannelsarray<object>

The alert notification methods.

NotificationChannelobject

The alert notification method.

Channelsarray

The alert notification methods.

Channelstring

The alert notification method. Valid values:

  • Mail
  • Sms
  • Phone
  • Feishu
  • Weixin: WeCom notification
  • Dingding
  • Webhook
Mail
NotificationReceiversarray<object>

The alert recipients.

NotificationReceiverobject

The alert recipient.

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
ReceiverValuesarray

The alert recipients.

ReceiverValuestring

The alert recipient.

user1
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"}

Examples

Sample success responses

JSONformat

{
  "RequestId": "691CA452-D37A-4ED0-9441",
  "PagingInfo": {
    "TotalCount": "131",
    "PageSize": "10",
    "PageNumber": "1",
    "DataQualityEvaluationTasks": [
      {
        "Id": 10001,
        "Name": "",
        "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": [
            10001
          ]
        },
        "RuntimeConf": "{ \"queue\": \"default\", \"sqlEngine\": \"SPARK-SQL\" }",
        "Hooks": [
          {
            "Type": "BlockTaskInstance",
            "Condition": "${severity} == \"High\" AND ${status} == \"Critical\""
          }
        ],
        "Notifications": {
          "Condition": "${severity} == \"High\"",
          "Notifications": [
            {
              "NotificationChannels": [
                {
                  "Channels": [
                    "Mail"
                  ]
                }
              ],
              "NotificationReceivers": [
                {
                  "ReceiverType": "AliUid",
                  "ReceiverValues": [
                    "user1"
                  ],
                  "Extension": "{\"atAll\":\"true\"}"
                }
              ]
            }
          ]
        }
      }
    ]
  }
}

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-12-04The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-11-06The response structure of the API has changedView Change Details