ListDataQualityScans

Updated at:

Queries the list of data quality check tasks in a specified project.

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

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:ListDataQualityScans

list

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Name

string

No

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

test

SortBy

string

No

The list of sort fields. You can sort by fields such as modification time and creation time. The format is SortField+SortOrder (Desc/Asc). The default value is Asc and can be omitted. Valid values for the sort field:

  • ModifyTime (Desc/Asc)

  • CreateTime (Desc/Asc)

  • Id (Desc/Asc)

ModifyTime Desc

PageSize

integer

Yes

The number of entries per page. Default value: 10.

10

PageNumber

integer

Yes

The page number. Default value: 1.

1

ProjectId

integer

Yes

The project ID.

10000

Table

string

No

The name of the monitored table. Fuzzy match is supported.

video_album

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

0bc14115***159376359

PageInfo

object

The pagination information.

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page. Default value: 10.

10

TotalCount

integer

The total number of data quality checks that meet the query conditions.

1

DataQualityScans

array<object>

The list of data quality checks.

array<object>

The data quality check information.

ModifyTime

integer

The update time of the data quality check. The value is a UNIX timestamp in milliseconds.

1731550150000

Owner

string

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

23782382795249

Description

string

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

This is a hourly run data quality evaluation plan.

ModifyUser

string

The user ID of the user who last updated the data quality check.

23782382795249

Parameters

array<object>

The execution parameters of the data quality check.

object

The execution parameters of the data quality check.

Value

string

The parameter value.

$[yyyy-mm-dd-1]

Name

string

The parameter name.

dt

CreateTime

integer

The creation time of the data quality check. The value is a UNIX timestamp in milliseconds.

1694512304000

ProjectId

integer

The project ID.

59094

CreateUser

string

The user who created the data quality check.

7892346529452

ComputeResource

object

The compute engine used when the data quality check runs. This parameter can be empty. If it is not specified, the data source connection specified in the spec is used.

Runtime

object

The advanced settings for the runtime of the data quality check.

HiveConf

string

The advanced parameter settings when the Hive engine is used. Currently, only the queue can be configured by using mapreduce.job.queuename.

mapreduce.job.queuename=dq_queue

SparkConf

string

The advanced parameter settings when the Spark engine is used. Currently, only the queue can be configured by using spark.yarn.queue.

spark.yarn.queue=dq_queue

Engine

string

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

  • Hive: Hive SQL

  • Spark: Spark SQL

  • Kyuubi

Hive

EnvType

string

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

  • Prod: production environment

  • Dev: development environment

Prod

Name

string

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

emr_cluster_001

Name

string

The name of the data quality check task. The name can contain digits, letters, Chinese characters, and half-width or full-width punctuation marks. It can be up to 255 characters in length.

Hourly partition quality monitoring

RuntimeResource

object

The resource group used when the data quality check runs.

Cu

number

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

0.25

Id

string

The resource group ID.

Serverless_resource_group_xxxxx

Image

string

The image ID of the task runtime configuration.

i-xxxxx

Trigger

object

The trigger settings of the data quality check.

Type

string

The trigger method of the data quality check. Valid values:

  • ByManual: manual trigger. This is the default value.

  • BySchedule: scheduled task instance trigger.

BySchedule

TaskIds

array

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

integer

The scheduled task ID.

1023777390

Hooks

array<object>

The hook configurations after the data quality check finishes running.

object

The hook configurations after the data quality check finishes running.

Condition

string

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 among the rules that execute, if the check result of a rule with the severity of Normal is Fail, the check result of a rule with the severity of High is Error, or the check result of a rule with the severity of High is Warn, the condition is met. The valid values of severity in the conditional expression are the same as those in the spec. The valid values of 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

The hook type. Valid values:

  • BlockTaskInstance: blocks the scheduling of the task instance.

BlockTaskInstance

Id

integer

The data quality check ID.

26433

Examples

Success response

JSON format

{
  "RequestId": "0bc14115***159376359",
  "PageInfo": {
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 1,
    "DataQualityScans": [
      {
        "ModifyTime": 1731550150000,
        "Owner": "23782382795249",
        "Description": "This is a hourly run data quality evaluation plan.",
        "ModifyUser": "23782382795249",
        "Parameters": [
          {
            "Value": "$[yyyy-mm-dd-1]",
            "Name": "dt"
          }
        ],
        "CreateTime": 1694512304000,
        "ProjectId": 59094,
        "CreateUser": "7892346529452",
        "ComputeResource": {
          "Runtime": {
            "HiveConf": "mapreduce.job.queuename=dq_queue",
            "SparkConf": "spark.yarn.queue=dq_queue",
            "Engine": "Hive"
          },
          "EnvType": "Prod",
          "Name": "emr_cluster_001"
        },
        "Name": "Hourly partition quality monitoring",
        "RuntimeResource": {
          "Cu": 0.25,
          "Id": "Serverless_resource_group_xxxxx",
          "Image": "i-xxxxx"
        },
        "Trigger": {
          "Type": "BySchedule",
          "TaskIds": [
            1023777390
          ]
        },
        "Hooks": [
          {
            "Condition": "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": "BlockTaskInstance"
          }
        ],
        "Id": 26433
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.