UpdateDataQualityEvaluationTask

Updated at:

Updates a data quality check task.

Note

This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - UpdateDataQualityScan for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

Operation description

You must purchase DataWorks Basic Edition or later to use this feature.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:UpdateDataQualityEvaluationTask

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Target

object

No

The monitored object for data quality monitoring.

DatabaseType

string

No

The database type of the table. Valid values:

  • maxcompute

  • hologres

  • cdh

  • analyticdb_for_mysql

  • starrocks

  • emr

  • analyticdb_for_postgresql

maxcompute

TableGuid

string

No

The unique ID of the table in DataWorks Data Map.

odsp.openapi.ods_d_openapi_log

PartitionSpec

string

No

The partition settings of the partitioned table.

dt=$[yyyymmdd-1]

Description

string

No

The description of the quality monitoring task.

OpenAPI data quality monitoring test.

Name

string

No

The name of the quality monitoring task.

OpenAPI data quality monitoring test.

RuntimeConf

string

No

The extension configuration. This parameter is a character string in JSON format and takes effect only for EMR data quality monitoring.

  • queue: the YARN queue used when you execute EMR data validation. Default value: the queue configured for the current project.

  • sqlEngine: the SQL DPI engine used when you execute EMR data validation. Valid values:
    • HIVE_SQL

    • SPARK_SQL

{ "queue": "default", "sqlEngine": "SPARK_SQL" }

Trigger

object

No

The trigger configuration of the data quality check task.

Type

string

No

The trigger type of the quality monitoring task. Valid values:

  • ByScheduledTaskInstance: triggered by an associated scheduled task

  • ByManual: manually triggered

ByScheduledTaskInstance

TaskIds

array

No

The list of scheduled task IDs. This parameter takes effect only when Type is set to ByScheduledTaskInstance.

integer

No

The ID of the scheduled task node.

1004979033

ProjectId

integer

Yes

The workspace ID.

10000

Hooks

array<object>

No

The hook settings.

object

No

Hook

Type

string

No

The hook action executed after the data quality check is completed. Valid values:

  • BlockTaskInstance: blocks the scheduled task

ByScheduledTaskInstance

Condition

string

No

The Cause of the hook. When this Cause is met, the hook action is triggered. Currently, only the following two types of conditional expressions are supported:

  • Specify only one group of rule severity levels and rule check statuses, such as ${severity} == "High" AND ${status} == "Critical". This indicates that if the check result of a rule you execute with the severity of High is Critical, the condition is met.

  • Specify multiple groups of rule severity levels and rule check statuses, such as (${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error"). This indicates that if the check result of a rule you execute with the severity of High is Critical, the check result of a rule you execute with the severity of Normal is Critical, or the check result of a rule you execute with the severity of Normal is Error, the condition is met. The enum values of severity in the conditional expression are consistent with those in DataQualityRule, and the enum values of status are consistent with those in DataQualityResult.

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

Notifications

object

No

The notification subscription configuration.

Condition

string

No

The Cause of the notification. When this Cause is met, a message notification is triggered. Currently, only the following two types of conditional expressions are supported:

  • Specify only one group of rule severity levels and rule check statuses, such as ${severity} == "High" AND ${status} == "Critical". This indicates that if the check result of a rule you execute with the severity of High is Critical, the condition is met.

  • Specify multiple groups of rule severity levels and rule check statuses, such as (${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error"). This indicates that if the check result of a rule you execute with the severity of High is Critical, the check result of a rule you execute with the severity of Normal is Critical, or the check result of a rule you execute with the severity of Normal is Error, the condition is met. The enum values of severity in the conditional expression are consistent with those in DataQualityRule, and the enum values of status are consistent with those in DataQualityResult.

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

Notifications

array<object>

No

The notification settings.

array<object>

No

The notification settings.

NotificationReceivers

array<object>

No

The alert recipient settings.

object

No

The alert recipient settings.

ReceiverType

string

No

The alert recipient type.

Valid values:

  • WebhookUrl :

    Custom webhook URL.

  • FeishuUrl :

    Lark notification URL.

  • DingdingUrl :

    DingTalk group chatbot URL.

  • WeixinUrl :

    WeChat notification URL.

  • AliUid :

    Alibaba Cloud user ID.

DingdingUrl

Extension

string

No

The additional parameter settings when an alert is sent. This parameter is in JSON format. Supported keys:

  • atAll: specifies whether to @all in the group when sending a DingTalk alert. This key takes effect only when ReceiverType is set to DingdingUrl.

{ "atAll": true }

ReceiverValues

array

No

The alert recipients.

string

No

The value of the recipient.

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

  • When the recipient type is DingdingUrl, the value is the specific alert URL of the DingTalk chatbot.

  • When the recipient type is WeixinUrl, the value is the specific alert URL of WeCom.

  • When the recipient type is FeishuUrl, the value is the specific alert URL of Lark.

  • When the recipient type is WebhookUrl, the value is the specific alert URL of the custom webhook.

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

NotificationChannels

array<object>

No

The notification methods.

object

No

The notification methods.

Channels

array

No

The notification methods.

string

No

The notification method. Valid values:

  • Dingding: DingTalk group chatbot

  • Mail: email

  • Weixin: WeChat notification

  • Feishu: Lark notification

  • Phone: phone call

  • Sms: text message

  • Webhook: custom webhook

Mail

DataSourceId

integer

No

The data source ID. You can call the ListDataSources operation to obtain the data source ID.

358750

DataQualityRules

array<object>

No

The list of data quality rules associated with data quality monitoring.

array<object>

No

Name

string

No

The name of the data quality rule.

OpenAPI test rules

Enabled

boolean

No

Specifies whether the data quality rule is enabled.

true

Severity

string

No

The severity level of the rule for the business, which corresponds to the strong and weak rules on the page. Valid values:

  • Normal

  • High

Valid values:

  • High :

    High.

  • Normal :

    Normal.

Normal

Description

string

No

The description of the data quality rule.

OpenAPI test rules

TemplateCode

string

No

The unique identifier of the rule template referenced by the rule.

SYSTEM:field:null_value:fixed:0

SamplingConfig

object

No

The parameters required for sample collection.

Metric

string

No

The name of the sampled metric. Valid values:

  • Count: the number of rows in the table

  • Min: the minimum value of the field

  • Max: the maximum value of the field

  • Avg: the average value of the field

  • DistinctCount: the number of unique values in the field

  • DistinctPercent: the ratio of the number of unique values in the field to the total number of rows

  • DuplicatedCount: the number of duplicate values in the field

  • DuplicatedPercent: the ratio of the number of duplicate values in the field to the total number of rows

  • TableSize: the size of the table

  • NullValueCount: the number of rows where the field is null

  • NullValuePercent: the proportion of rows where the field is null

  • GroupCount: the number of rows corresponding to each value after aggregation by field value

  • CountNotIn: the number of rows that do not match the enumerated values

  • CountDistinctNotIn: the number of unique values that do not match the enumerated values

  • UserDefinedSql: sample collection by using custom SQL statements

CountNotIn

MetricParameters

string

No

The parameters required for sample collection.

{ "Columns": [ "id", "name" ] , "SQL": "select count(1) from table;"}

SettingConfig

string

No

The runtime parameter setting statements inserted before the execution of sampling statements. The maximum length is 1,000 characters. Only MaxCompute is supported.

odps.sql.type.system.odps2=True,odps.sql.hive.compatible=True

SamplingFilter

string

No

The conditions used to filter out unneeded data during sampling. The maximum length is 16,777,215 characters.

status != 'Succeeded'

CheckingConfig

object

No

The sample check settings.

Type

string

No

The threshold calculation method. Valid values:

  • Fluctation: fluctuation range check

  • Auto: intelligent threshold check

  • FluctationDiscreate: discrete value fluctuation range check

  • Average: average fluctuation range check

  • Fixed: fixed value check

Fixed

ReferencedSamplesFilter

string

No

The expression used to specify the query method for reference samples. Some threshold types require querying reference samples and aggregating their values to derive the comparison threshold.

{"bizdate": ["-1"]}

Thresholds

object

No

The check threshold settings.

Expected

object

No

The expected threshold settings.

Operator

string

No

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

=

Value

string

No

The threshold value.

0

Expression

string

No

The threshold expression.

For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:

  • Fluctuation increase greater than 0.01: $checkValue > 0.01

  • Fluctuation decrease greater than 0.01: $checkValue < -0.01

  • Absolute value of fluctuation rate: abs($checkValue) > 0.01

Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value.

$checkValue > 0.01

Warned

object

No

The threshold settings for normal warnings.

Operator

string

No

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Value

string

No

The threshold value.

0.001

Expression

string

No

The threshold expression.

For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:

  • Fluctuation increase greater than 0.01: $checkValue > 0.01

  • Fluctuation decrease greater than 0.01: $checkValue < -0.01

  • Absolute value of fluctuation rate: abs($checkValue) > 0.01

Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value.

$checkValue > 0.01

Critical

object

No

The threshold settings for critical warnings.

Operator

string

No

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Value

string

No

The threshold value.

0.01

Expression

string

No

The threshold expression.

For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:

  • Fluctuation increase greater than 0.01: $checkValue > 0.01

  • Fluctuation decrease greater than 0.01: $checkValue < -0.01

  • Absolute value of fluctuation rate: abs($checkValue) > 0.01

Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value.

$checkValue > 0.01

ErrorHandlers

array<object>

No

The error handlers for quality rule check issues.

object

No

Type

string

No

The handler type. Valid values:

  • SaveErrorData: retain error data

SaveErrorData

ErrorDataFilter

string

No

The SQL statement used to filter error data. This parameter is required if the rule is a custom SQL rule.

SELECT * FROM ods_d_openapi_log WHERE status = 'Error'

Id

integer

No

The ID of the check rule. You can call the ListQualityRules operation to obtain the rule ID.

1022171560

Id

integer

Yes

The ID of the data quality monitoring task.

7227061794

Response elements

Element

Type

Description

Example

object

Schema of Response

Success

boolean

Indicates whether the request is successful.

true

RequestId

string

The request ID. You can use the ID to locate logs and troubleshoot issues.

8abcb91f-d266-4073-b907-2ed670378ed1

Examples

Success response

JSON format

{
  "Success": true,
  "RequestId": "8abcb91f-d266-4073-b907-2ed670378ed1"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.