全部產品
Search
文件中心

DataWorks:GetDataQualityEvaluationTaskInstance

更新時間:Sep 03, 2026

取得資料品質校驗任務執行個體詳情。

說明

目前該API介面已標記為棄用,推薦使用替代API:dataworks-public(2024-05-18) - GetDataQualityScanRun。

介面說明

需要購買 DataWorks 基礎版及以上版本才能使用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

Id

integer

是

資料品質監控執行個體 ID。

7227550902

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。用於定位日誌,排查問題。

8abcb91f-d266-4073-b907-2ed67****

DataQualityEvaluationTaskInstance

object

資料品質監控執行個體詳情。

Status

string

資料品質監控執行個體狀態。

  • Running:校驗中

  • Error:有規則校驗出錯

  • Passed:所有規則校驗通過

  • Warned:有規則觸發普通告警閾值

  • Critical:有規則觸發嚴重告警閾值

Passed

Task

object

資料品質監控。

Name

string

The name of the monitor.

Data quality OpenAPI monitoring test

Notifications

object

The configurations of alert notifications.

Condition

string

The notification trigger condition. When this condition is met, the alert notification is triggered. Only two conditional expressions are supported:

  • Specify only one group of rule strength type and rule check status, such as ${severity} == "High" AND ${status} == "Critical". In this expression, the hook trigger condition is met if severity is High and status is Critical.

  • Specify multiple groups of rule strength types and rule check status, such as (${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error"). In this expression, the hook trigger condition is met if severity is High and status is Critical, severity is Normal and status is Critical, or severity is Normal and status is Error. The enumeration of severity in a conditional expression is the same as the enumeration of severity in DataQualityRule. The enumeration of status in a conditional expression is the same as the enumeration of status in DataQualityResult.

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

Notifications

array<object>

The alert notification methods.

array<object>

NotificationReceivers

array<object>

The value of the receiver.

object

ReceiverType

string

The type of alert recipient.

DingdingUrl

Extension

string

Additional parameter settings for sending alerts in json format. The supported keys are as follows:

  • atAll: when sending DingTalk alerts, do you need to @ everyone in the group. It takes effect when ReceiverType is DingdingUrl.

{ "atAll": true }

ReceiverValues

array

The recipient of the alert.

string

The value of the receiver.

  • When the receiver type is Alibaba Cloud ID, the receiver value is the specific Alibaba cloud user ID.

  • When the receiver type is DingdingUrl, the receiver value is the alert address of the specific DingTalk robot.

  • When the receiver type is WeixinUrl, the receiver value is the alert address of the specific Enterprise WeChat.

  • When the receiver type is FeishuUrl, the receiver value is the alert address of the specific flying book.

  • When the receiver type is WebhookUrl, the receiver value is the alert address of the specific custom Webhook.

https://api.fc.aliyuncs.com/webhook

NotificationChannels

array<object>

The notification method.

object

Channels

array

The notification method.

string

Alarm mode

  • Mail: Mail

  • Sms: Sms

  • Phone: Phone

  • Feishu: flying book

  • Weixin: WeChat

  • Dingding: DingTalk

  • Webhook: custom Webhook

Mail

Hooks

array<object>

The hook.

object

Type

string

Hook type. Currently, only one type is supported:

  • BlockTaskInstance: the blocking scheduling task continues to run. Data quality monitoring is triggered by the scheduling task. After the data quality monitoring is completed, the Hook.Condition is used to determine whether the blocking scheduling task continues to run.

BlockTaskInstance

Condition

string

The hook trigger condition. When this condition is met, the hook action is triggered. Only two conditional expressions are supported:

  • Specify only one group of rule strength type and rule check status, such as ${severity} == "High" AND ${status} == "Critical". In this expression, the hook trigger condition is met if severity is High and status is Critical.

  • Specify multiple groups of rule strength types and rule check status, such as (${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error"). In this expression, the hook trigger condition is met if severity is High and status is Critical, severity is Normal and status is Critical, or severity is Normal and status is Error. The enumeration of severity in a conditional expression is the same as the enumeration of severity in DataQualityRule. The enumeration of status in a conditional expression is the same as the enumeration of status in DataQualityResult.

(${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error")

RuntimeConf

string

Extended configuration, JSON-formatted string, takes effect only for EMR-type data quality monitoring.

  • queue: the yarn queue used when performing EMR data quality verification. The default queue is the queue configured for this project.

  • sqlEngine: SQL engine used when performing EMR data verification
    • HIVE_ SQL

    • SPARK_ SQL

{ "queue": "default" }

Trigger

object

The trigger configuration of the monitor.

Type

string

The trigger type of the monitor. Valid values:

  • ByManual (default): The monitor is manually triggered.

  • ByScheduledTaskInstance: The monitor is triggered by the associated scheduling tasks.

ByScheduledTaskInstance

TaskIds

array

The Id list of the scheduled task, which is valid when the Type is ByScheduledTaskInstance.

integer

The Id of the scheduled task.

70006236752324

Target

object

The monitored object of the monitor.

Type

string

The type of the monitoring object.

  • Table: Table

Table

DatabaseType

string

The type of the database to which the table belongs.

maxcompute

TableGuid

string

The unique ID of the table in the data map.

odps.api_trace.ods_d_api_log

PartitionSpec

string

The partition range monitored.

pt=$[yyyymmdd-1]

Description

string

The description of the monitor.

OpenAPI quality monitoring test

Id

integer

The ID of the data quality monitor.

28544990

ProjectId

integer

The ID of the workspace.

20629

Parameters

string

資料品質校驗執行參數,JSON 格式,可用的 key 如下:

  • triggerTime:觸發時間的毫秒時間戳,資料品質監控的資料範圍中$[yyyymmdd]運算式的基準時間,必填。

{ "triggerTime": 1733284062000 }

FinishTime

integer

執行個體執行的結束時間。

1716344665000

TriggerContext

string

執行個體觸發時的上下文資訊,JSON 格式。可能包含的 key 如下:

  • TriggerClient:資料品質監控執行個體的觸發來源,常見的如 CWF2(排程系統)等,後續有可能會新增。

  • TriggerClientId:關聯到來源系統中某個具體的業務資源。比如 TriggerClient 為 CWF2 時,這裡記錄排程任務 ID。

{ "triggerClient": "CWF2", "triggerClientId": 70001238945 }

CreateTime

integer

建立時間。

1716344665000

Id

integer

資料品質監控執行個體 ID。

7234231689

ProjectId

integer

工作空間的 ID。

98330

Results

array<object>

array<object>

Id

integer

Status

string

CreateTime

integer

TaskInstanceId

integer

Sample

string

Details

array<object>

object

ReferencedValue

string

CheckedValue

string

Status

string

Rule

object

Id

integer

Name

string

ProjectId

integer

Enabled

boolean

Severity

string

Description

string

TemplateCode

string

Target

object

Type

string

DatabaseType

string

TableGuid

string

SamplingConfig

object

Metric

string

MetricParameters

string

SettingConfig

string

SamplingFilter

string

CheckingConfig

object

Type

string

ReferencedSamplesFilter

string

Thresholds

object

Expected

object

Value

string

Operator

string

Expression

string

Warned

object

Value

string

Operator

string

Expression

string

Critical

object

Value

string

Operator

string

Expression

string

ErrorHandlers

array<object>

object

Type

string

ErrorDataFilter

string

樣本

正常返回樣本

JSON格式

{
  "RequestId": "8abcb91f-d266-4073-b907-2ed67****",
  "DataQualityEvaluationTaskInstance": {
    "Status": "Passed",
    "Task": {
      "Name": "Data quality OpenAPI monitoring test\n",
      "Notifications": {
        "Condition": "${severity} == \"High\" AND ${status} == \"Critical\"",
        "Notifications": [
          {
            "NotificationReceivers": [
              {
                "ReceiverType": "DingdingUrl",
                "Extension": "{ \"atAll\": true }",
                "ReceiverValues": [
                  "https://api.fc.aliyuncs.com/webhook"
                ]
              }
            ],
            "NotificationChannels": [
              {
                "Channels": [
                  "Mail"
                ]
              }
            ]
          }
        ]
      },
      "Hooks": [
        {
          "Type": "BlockTaskInstance",
          "Condition": "(${severity} == \"High\" AND ${status} == \"Critical\") OR (${severity} == \"Normal\" AND ${status} == \"Critical\") OR (${severity} == \"Normal\" AND ${status} == \"Error\")"
        }
      ],
      "RuntimeConf": "{ \"queue\": \"default\" }",
      "Trigger": {
        "Type": "ByScheduledTaskInstance",
        "TaskIds": [
          70006236752324
        ]
      },
      "Target": {
        "Type": "Table",
        "DatabaseType": "maxcompute",
        "TableGuid": "odps.api_trace.ods_d_api_log",
        "PartitionSpec": "pt=$[yyyymmdd-1]"
      },
      "Description": "OpenAPI quality monitoring test",
      "Id": 28544990,
      "ProjectId": 20629
    },
    "Parameters": "{ \"triggerTime\": 1733284062000 }\n",
    "FinishTime": 1716344665000,
    "TriggerContext": "{ \"triggerClient\": \"CWF2\", \"triggerClientId\": 70001238945 }",
    "CreateTime": 1716344665000,
    "Id": 7234231689,
    "ProjectId": 98330,
    "Results": [
      {
        "Id": 0,
        "Status": "",
        "CreateTime": 0,
        "TaskInstanceId": 0,
        "Sample": "",
        "Details": [
          {
            "ReferencedValue": "",
            "CheckedValue": "",
            "Status": ""
          }
        ],
        "Rule": {
          "Id": 0,
          "Name": "",
          "ProjectId": 0,
          "Enabled": false,
          "Severity": "",
          "Description": "",
          "TemplateCode": "",
          "Target": {
            "Type": "",
            "DatabaseType": "",
            "TableGuid": ""
          },
          "SamplingConfig": {
            "Metric": "",
            "MetricParameters": "",
            "SettingConfig": "",
            "SamplingFilter": ""
          },
          "CheckingConfig": {
            "Type": "",
            "ReferencedSamplesFilter": "",
            "Thresholds": {
              "Expected": {
                "Value": "",
                "Operator": "",
                "Expression": ""
              },
              "Warned": {
                "Value": "",
                "Operator": "",
                "Expression": ""
              },
              "Critical": {
                "Value": "",
                "Operator": "",
                "Expression": ""
              }
            }
          },
          "ErrorHandlers": [
            {
              "Type": "",
              "ErrorDataFilter": ""
            }
          ]
        }
      }
    ]
  }
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情。