All Products
Search
Document Center

DataWorks:UpdateDataQualityScan

Last Updated:Mar 30, 2026

Updates a data quality monitor.

Operation description

DataWorks Basic Edition or a higher edition is required.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Description

string

No

Description of the data quality monitor.

Daily data quality scanning of ods tables.

ProjectId

integer

No

The ID of the DataWorks workspace where the data quality monitor resides. You can obtain the workspace ID by calling the ListProjects operation.

101

Id

integer

No

The ID of the data quality monitor.

10001

Owner

string

No

The user ID of the owner of the data quality monitor.

231263586109857423

Spec

string

No

The Spec code of the data quality monitoring content. For more information, see Data quality Spec configuration description.

{ "datasets": [ { "type": "Table", "dataSource": { "name": "odps_first", "envType": "Prod" }, "tables": [ "ods_d_user_info" ], "filter": "pt = $[yyyymmdd-1]" } ], "rules": [ { "assertion": "row_count > 0" }, { "templateId": "SYSTEM:field:null_value:fixed", "pass": "when = 0", "name": "The id cannot be empty.", "severity": "High", "identity": "a-customized-data-quality-rule-uuid" } ] }

Parameters

array<object>

No

The definition of execution parameters for the data quality monitor.

object

No

The parameter information.

Value

string

No

The parameter value.

smtp.qiye.aliyun.com

Name

string

No

The parameter name.

temp_237669.zip_byBwm_1734661241752

RuntimeResource

object

No

The resource group used during the execution of the data quality monitor.

Id

string

No

The ID of the resource group.

20315

Cu

number

No

The default number of CUs configured for task running.

0.25

Image

string

No

The image ID of the task runtime configuration.

i-xxxxxx

ComputeResource

object

No

The compute engine used during execution. If it's not specified, the data source connection defined in the Spec will be used.

Name

string

No

The name of the compute engine, which is a unique identifier.

auto_createAlertRule_Finished_1kUTk6

Runtime

object

No

Additional settings for the compute engine.

Engine

string

No

The engine type. These settings are only supported for the EMR compute engine.This setting? Valid values:

  • Hive: Hive SQL

  • Spark: Spark SQL

  • Kyuubi

Hive

SparkConf

object

No

Additional Spark engine parameters. Currently, only the spark.yarn.queue parameter is supported.

spark.yarn.queue=dq_queue

HiveConf

object

No

Additional Hive engine parameters. Currently, only the mapreduce.job.queuename parameter is supported.

mapreduce.job.queuename=dq_queue

EnvType

string

No

Workspace environment of the compute engine. Valid values:

  • Prod

  • Dev

Prod

Trigger

object

No

Trigger settings for the data quality monitor.

Type

string

No

The trigger mode of the data quality monitor. Valid values:

  • ByManual: Manually triggered. Default setting.

  • BySchedule: Triggered by a scheduled task instance.

BySchedule

TaskIds

array

No

If the trigger mode is BySchedule, the ID of the scheduling task that triggers the monitor must be configured.

integer

No

The scheduling task ID.

30001

Hooks

array<object>

No

The hook configuration after the data quality monitor stops.

object

No

The hook configuration after the data quality monitor stops.

Condition

string

No

The hook trigger condition. When this condition is met, the hook is triggered. Valid expression format:

Specifies multiple combinations of rule severity levels and rule validation statuses, such as results.any { r -> r.status == 'Fail' && r.rule.severity == 'Normal' || r.status == 'Error' && r.rule.severity == 'High' || r.status == 'Warn' && r.rule.severity == 'High' }. This means the hook is triggered if any executed rule has Fail with Normal severity, Error with High severity, or Warn with High severity. The severity values must match those defined in the Spec. The status values must match those in DataQualityResult.

results.any { r -> r.status == 'Fail' && r.rule.severity == 'Normal' || r.status == 'Error' && r.rule.severity == 'High' || r.status == 'Warn' && r.rule.severity == 'High' }

Type

string

No

The type of the hook. Valid values:

  • BlockTaskInstance: Block the scheduling of the task instance.

BlockTaskInstance

Name

string

No

The name of the data quality monitor.

data_quality_scan_001

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

22C97E95-F023-56B5-8852-B1A77A1****

Success

boolean

Indicates whether the call was successful.

true

Examples

Success response

JSON format

{
  "RequestId": "22C97E95-F023-56B5-8852-B1A77A1****",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.