All Products
Search
Document Center

DataWorks:GetDataQualityScan

Last Updated:Jan 12, 2026

Gets data quality monitoring details.

Operation description

This API operation is available for all DataWorks editions.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IdlongNo

The ID of the monitor.

10001

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

Id of the request

204EAF68-CCE3-5112-8DA0-E7A60F02XXXX
DataQualityScanobject

Data quality monitoring details.

Idlong

The data quality monitoring ID.

10001
Namestring

The data quality monitor name.

data_quality_scan_001
Descriptionstring

The data quality monitor description.

aily data quality scanning of ods tables.
ProjectIdlong

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

101
CreateTimelong

The creation time of the data quality monitor.

1731550150000
ModifyTimelong

Last modified time of the data quality monitor.

1731550150000
CreateUserstring

The ID of the user who creates the data quality monitor.

2374924198591250
ModifyUserstring

The ID of the user who last modifies the data quality monitor.

23482597582479
Ownerstring

The ID of the user who owns the data quality monitor.

231263586109857423
Specstring

Spec code for the content of the data quality monitoring.

{ "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" } ] }
Parametersarray<object>

The definition of execution parameters for the data quality monitor.

Parameterobject

The parameter information.

Valuestring

The parameter name.

10
Namestring

The parameter value.

e2e_autolabel
ComputeResourceobject

The compute engine used at runtime. Optional. If not specified, the data source defined in the Spec is used.

Namestring

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

polardb_to_holo
Runtimeobject

More settings for data quality monitor at runtime.

Enginestring

The type of the compute engine. Only EMR compute engines support these settings.

Valid values:

  • Hive: Hive SQL
  • Spark: Spark SQL
  • Kyuubi
Hive
HiveConfobject

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

mapreduce.job.queuename=dq_queue
SparkConfobject

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

spark.yarn.queue=dq_queue
EnvTypestring

The workspace environment to which the compute engine belongs.

Valid values:

  • Prod: production environment .
  • Dev: development environment.
Prod
RuntimeResourceobject

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

Idstring

The resource group ID.

122878
Cufloat

Reserved compute units (CU) for the resource group.

10
Imagestring

The image ID used in the runtime configuration.

hp-tlp-e2e-repo-registry-vpc.cn-heyuan-acdr-1.cr.aliyuncs.com/hp-service/worker:9b28b6d-202506091008
Triggerobject

The trigger configurations of the data quality monitoring task.

Typestring

The trigger mode of the monitoring task.

Valid values:

  • ByManual: Manual trigger. This is the default setting.
  • BySchedule: Triggered by a scheduled task instance.
BySchedule
TaskIdsarray

If the trigger mode is set to BySchedule, the scheduling task ID must be specified.

TaskIdlong

The ID of the scheduling task.

1023777390
Hooksarray<object>

The Hook configurations after the data quality monitoring run ends.

Hookobject

The Hook configurations after the data quality monitoring run ends.

Conditionstring

The Hook trigger condition. The hook will run if the condition is met. Currently, only one type of expression syntax is supported:

  • You can specify multiple combinations of rule severity levels and validation statuses using an expression 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 expression means the condition is met if any executed rule has a result of Fail with severity Normal, Error with severity High, or Warn with severity High. In the condition expression, the values of severity and status are predefined enums. The values of severity must match those defined in the Spec, and the values of status 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' }
Typestring

The type of the Hook.

Valid values:

  • BlockTaskInstance: BlockTaskInstance: Blocks the scheduling of the task instance.
BlockTaskInstance

Examples

Sample success responses

JSONformat

{
  "RequestId": "204EAF68-CCE3-5112-8DA0-E7A60F02XXXX",
  "DataQualityScan": {
    "Id": 10001,
    "Name": "data_quality_scan_001",
    "Description": "aily data quality scanning of ods tables.",
    "ProjectId": 101,
    "CreateTime": 1731550150000,
    "ModifyTime": 1731550150000,
    "CreateUser": 2374924198591250,
    "ModifyUser": 23482597582479,
    "Owner": 231263586109857400,
    "Spec": {
      "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": [
      {
        "Value": 10,
        "Name": "e2e_autolabel"
      }
    ],
    "ComputeResource": {
      "Name": "polardb_to_holo",
      "Runtime": {
        "Engine": "Hive",
        "HiveConf": {
          "test": "test",
          "test2": 1
        },
        "SparkConf": {
          "test": "test",
          "test2": 1
        }
      },
      "EnvType": "Prod"
    },
    "RuntimeResource": {
      "Id": 122878,
      "Cu": 10,
      "Image": "hp-tlp-e2e-repo-registry-vpc.cn-heyuan-acdr-1.cr.aliyuncs.com/hp-service/worker:9b28b6d-202506091008"
    },
    "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"
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.