UpdateDataQualityScan

Updated at:

Updates a data quality scan.

Operation description

You must purchase DataWorks Basic Edition or higher 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

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

The description of the data quality scan.

Daily data quality scanning of ods tables.

ProjectId

integer

No

The ID of the DataWorks workspace to which the data quality scan belongs. You can call the ListProjects operation to obtain the workspace ID.

101

Id

integer

No

The ID of the data quality scan. You can obtain the ID from the PageInfo.DataQualityScans[].Id parameter returned by the ListDataQualityScans operation.

10001

Owner

string

No

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

231263586109857423

Spec

string

No

The spec code of the data quality scan. This parameter is required. For more information, see Data quality spec configuration guide.

{ "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 execution parameters defined for the data quality scan.

object

No

The parameter information.

Value

string

No

The value of the parameter.

$[yyyy-mm-dd-1]

Name

string

No

The name of the parameter.

dt

RuntimeResource

object

No

The resource group used when the data quality scan runs.

Id

string

No

The ID of the resource group.

20315

Cu

number

No

The number of compute units (CUs) consumed by the runtime configuration.

0.25

Image

string

No

The ID of the image used in the task runtime configuration.

i-xxxxxx

ComputeResource

object

No

The compute engine used when the data quality scan runs. This parameter is optional. If you do not specify this parameter, the data source connection specified in the spec is used.

Name

string

No

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

auto_createAlertRule_Finished_1kUTk6

Runtime

object

No

The advanced settings for using the compute engine.

Engine

string

No

The type of the engine. Only the E-MapReduce (EMR) compute engine supports this setting. Valid values:

  • Hive: Hive SQL

  • Spark: Spark SQL

  • Kyuubi

Hive

SparkConf

object

No

The advanced parameter settings for the Spark engine. Currently, you can only use spark.yarn.queue to specify a queue.

{"spark.yarn.queue": "dq_queue"}

HiveConf

object

No

The advanced parameter settings for the Hive engine. Currently, you can only use mapreduce.job.queuename to specify a queue.

{"mapreduce.job.queuename": "dq_queue"}

EnvType

string

No

The project environment to which the compute engine belongs. Valid values:

  • Prod: production environment

  • Dev: development environment

Valid values:

  • Prod :

    Production environment.

  • Dev :

    Development environment.

Prod

Trigger

object

No

The trigger settings for the data quality scan.

Type

string

No

The trigger method for the data quality scan. Valid values:

  • ByManual: Triggered manually. This is the default value.

  • BySchedule: Triggered by a scheduled task instance.

BySchedule

TaskIds

array

No

The IDs of the scheduled tasks that trigger the data quality scan when the trigger method is set to BySchedule.

integer

No

The ID of the scheduled task.

30001

Hooks

array<object>

No

The hook configurations that take effect after the data quality scan finishes running.

object

No

The hook configurations that take effect after the data quality scan finishes running.

Condition

string

No

The trigger condition of the hook. When this condition is met, the hook is triggered. Currently, only one expression syntax is supported:

Specify multiple groups of rule severity levels and rule check statuses. For example, results.any { r -> r.status == 'Fail' && r.rule.severity == 'Normal' || r.status == 'Error' && r.rule.severity == 'High' || r.status == 'Warn' && r.rule.severity == 'High' } indicates that the condition is met if any of the executed rules meet the following criteria: a rule with a severity of Normal has a check status of Fail, a rule with a severity of High has a check status of Error, or a rule with a severity of High has a check status of Warn. The enum values for severity in the conditional expression are the same as those in the spec, and the enum values for status are the same as 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: Blocks the scheduling of the task instance.

Valid values:

  • BlockTaskInstance :

    Blocks the scheduling of the task instance.

BlockTaskInstance

Name

string

No

The name of the data quality scan.

data_quality_scan_001

Response elements

Element

Type

Description

Example

object

The 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.