All Products
Search
Document Center

DataWorks:GetDataQualityScanRun

Last Updated:Jan 12, 2026

Creates a data quality monitoring run instance.

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 data quality monitoring run record ID.

1006059507

Response parameters

ParameterTypeDescriptionExample
object

The response.

RequestIdstring

The request ID.

0bc14115****159376359
DataQualityScanRunobject

Data quality monitoring running records.

Idlong

The running record ID.

1016440997
CreateTimelong

The time when the data quality monitor starts running.

1706247622000
FinishTimelong

The time when the data quality monitor stops.

1706247622000
Statusstring

The current running status.

  • Pass
  • Running
  • Error
  • Warn
  • Fail
Fail
Scanobject

The snapshot of the data quality monitor configuration at the start of the validation.

Idlong

The data quality monitor ID.

21077
Namestring

The name of the data quality validation task. It can contain digits, letters, Chinese characters, and both half-width and full-width punctuation marks, with a maximum length of 255 characters.

Hourly partition quality monitoring
Descriptionstring

The description of the data quality validation task. Maximum length: 65,535 characters.

This is a hourly run data quality evaluation plan.
ProjectIdlong

The project ID.

164024
CreateTimelong

The creation time of the data quality monitor.

1706247622000
ModifyTimelong

The last update time of the data quality monitor.

1706247622000
CreateUserstring

The creator of the data quality monitor.

7892346529452
ModifyUserstring

The last updater of the data quality monitor.

7892346529452
Ownerstring

The owner of the data quality monitor.

7892346529452
Specstring

The data quality monitor Spec. 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" } ] }
Parametersarray<object>

The parameter settings of the data quality monitor.

Parameterobject

The parameter settings of the data quality monitor.

Valuestring

The parameter value.

$[yyyy-mm-dd-1]
Namestring

The parameter name.

dt
ComputeResourceobject

The computing resource settings of the data quality monitor.

Namestring

The name of the computing resource, which corresponds to the Name attribute in the ComputeResource data structure of the computing resource API.

emr_cluster_001
Runtimeobject

The additional runtime settings of the data quality monitor.

Enginestring

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

  • Hive
  • Spark
  • Kyuubi
Hive
SparkConfobject

Additional parameters for the Spark engine. Currently, only spark.yarn.queue is supported to specify the queue.

spark.yarn.queue=dq_queue
HiveConfobject

Additional parameters for the Hive engine. Currently, only mapreduce.job.queuename is supported to specify the queue.

mapreduce.job.queuename=dq_queue
EnvTypestring

The workspace environment to which the compute engine belongs.

  • Prod
  • Dev
Dev
RuntimeResourceobject

The resource group used for running the data quality monitor.

Idstring

The resource group ID.

60597
Cufloat

Reserved CUs for the resource group.

1
Imagestring

The image ID of the run configuration.

i-xxxx
Triggerobject

The trigger configurations of the data quality monitor.

Typestring

The trigger method of the data quality monitor.

  • ByManual
  • BySchedule
BySchedule
TaskIdsarray

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

TaskIdlong

The scheduling task ID.

1014217266
Hooksarray<object>

The hook configurations after the data quality monitor stops.

Hookobject

The hook configurations after the data quality monitor stops.

Conditionstring

The hook trigger condition. Currently, only one type of expression syntax is supported:

  • Specify combinations of severity levels and validation statuses for multiple rules, 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. In the conditional expression, the severity value matches that in the Spec code, and the status value matches that in DataQualityResult.
results.any { r -> r.status == 'fail' && r.rule.severity == 'High' }
Typestring

The type of the hook.

  • BlockTaskInstance
BlockTaskInstance
Parametersarray<object>

The parameter settings used during the actual running.

Parameterobject

Parameter settings.

Valuestring

The parameter value.

$[yyyy-mm-dd-1]
Namestring

The parameter name.

dt
Resultsarray<object>

The validation results of each rule.

Resultobject

The validation result of the rule.

Statusstring

The validation result status.

  • Pass
  • Running
  • Error
  • Warn
  • Fail
Fail
Detailsarray<object>

The information about the data quality check.

Detailobject

The information about the data quality check.

Statusstring

The final comparison result status.

  • Pass
  • Error
  • Warn
  • Fail
Fail
ReferenceValuestring

The reference sample used as the baseline for calculating the CheckedValue.

0.0
CheckValuestring

The final value used for comparison with the threshold.

100.0
Samplestring

The sample value used in the validation.

{ "value": "100.0" }
CreateTimelong

The time when the validation result is generated.

1725506795000
Rulestring

The snapshot of the rule Spec at the start of the validation.

{ "templateId": "SYSTEM:field:null_value:fixed", "pass": "when = 0", "name": "The id cannot be empty.", "severity": "High", "identity": "a-customized-data-quality-rule-uuid" }

Examples

Sample success responses

JSONformat

{
  "RequestId": "0bc14115****159376359",
  "DataQualityScanRun": {
    "Id": 1016440997,
    "CreateTime": 1706247622000,
    "FinishTime": 1706247622000,
    "Status": "Fail",
    "Scan": {
      "Id": 21077,
      "Name": "Hourly partition quality monitoring",
      "Description": "This is a hourly run data quality evaluation plan.",
      "ProjectId": 164024,
      "CreateTime": 1706247622000,
      "ModifyTime": 1706247622000,
      "CreateUser": 7892346529452,
      "ModifyUser": 7892346529452,
      "Owner": 7892346529452,
      "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": "$[yyyy-mm-dd-1]",
          "Name": "dt"
        }
      ],
      "ComputeResource": {
        "Name": "emr_cluster_001",
        "Runtime": {
          "Engine": "Hive",
          "SparkConf": {
            "test": "test",
            "test2": 1
          },
          "HiveConf": {
            "test": "test",
            "test2": 1
          }
        },
        "EnvType": "Dev"
      },
      "RuntimeResource": {
        "Id": 60597,
        "Cu": 1,
        "Image": "i-xxxx"
      },
      "Trigger": {
        "Type": "BySchedule",
        "TaskIds": [
          1014217266
        ]
      },
      "Hooks": [
        {
          "Condition": "results.any { r -> r.status == 'fail' && r.rule.severity == 'High' }",
          "Type": "BlockTaskInstance"
        }
      ]
    },
    "Parameters": [
      {
        "Value": "$[yyyy-mm-dd-1]",
        "Name": "dt"
      }
    ],
    "Results": [
      {
        "Status": "Fail",
        "Details": [
          {
            "Status": "Fail",
            "ReferenceValue": 0,
            "CheckValue": 100
          }
        ],
        "Sample": {
          "value": 100
        },
        "CreateTime": 1725506795000,
        "Rule": {
          "templateId": "SYSTEM:field:null_value:fixed",
          "pass": "when = 0",
          "name": "The id cannot be empty.",
          "severity": "High",
          "identity": "a-customized-data-quality-rule-uuid"
        }
      }
    ]
  }
}

Error codes

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