GetDataQualityScanRun
Queries the details of a specified data quality scan run.
Operation description
You must purchase DataWorks Basic Edition or a higher edition to use this feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetDataQualityScanRun |
get |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Id |
integer |
No |
The ID of the data quality scan run. This parameter is required. You can obtain the ID from the PageInfo.DataQualityScanRuns[].Id parameter returned by the ListDataQualityScanRuns operation. |
1006059507 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned results. |
||
| RequestId |
string |
The request ID. |
0bc14115****159376359 |
| DataQualityScanRun |
object |
The data quality scan run. |
|
| Id |
integer |
The ID of the scan run. |
1016440997 |
| CreateTime |
integer |
The time when the scan run was created. The value is a UNIX timestamp in milliseconds. |
1706247622000 |
| FinishTime |
integer |
The time when the scan run was last updated. The value is a UNIX timestamp in milliseconds. |
1706247622000 |
| Status |
string |
The current status of the scan run. Valid values:
|
Fail |
| Scan |
object |
The snapshot of the data quality scan configuration at the start of the check. |
|
| Id |
integer |
The ID of the data quality scan. |
21077 |
| 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, and can be up to 255 characters in length. |
Hourly partition quality monitoring |
| 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. |
| ProjectId |
integer |
The ID of the project. |
164024 |
| CreateTime |
integer |
The time when the data quality scan was created. The value is a UNIX timestamp in milliseconds. |
1706247622000 |
| ModifyTime |
integer |
The time when the data quality scan was last modified. The value is a UNIX timestamp in milliseconds. |
1706247622000 |
| CreateUser |
string |
The user who created the data quality scan. |
7892346529452 |
| ModifyUser |
string |
The user who last updated the data quality scan. |
7892346529452 |
| Owner |
string |
The owner of the data quality scan. |
7892346529452 |
| Spec |
string |
The specification of the data quality scan. For more information, see Data quality specification configuration. |
{ "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> |
The parameter settings of the data quality scan. |
|
|
object |
The parameter settings of the data quality scan. |
||
| Value |
string |
The value of the parameter. |
$[yyyy-mm-dd-1] |
| Name |
string |
The name of the parameter. |
dt |
| ComputeResource |
object |
The compute resource settings of the data quality scan. |
|
| Name |
string |
The name of the compute resource. This corresponds to the Name property in the ComputeResource data structure of the compute resource API. |
emr_cluster_001 |
| Runtime |
object |
The additional runtime settings of the data quality scan. |
|
| Engine |
string |
The type of the engine used. This parameter can be configured only when the EMR compute engine is used. Valid values:
|
Hive |
| SparkConf |
object |
The additional parameter settings when the Spark engine is used. Currently, you can only set the queue by using spark.yarn.queue. |
{"spark.yarn.queue": "dq_queue"} |
| HiveConf |
object |
The additional parameter settings when the Hive engine is used. Currently, you can only set the queue by using mapreduce.job.queuename. |
{"mapreduce.job.queuename": "dq_queue"} |
| EnvType |
string |
The workspace environment to which the compute engine belongs. Valid values:
|
Dev |
| RuntimeResource |
object |
The resource group used when the data quality scan runs. |
|
| Id |
string |
The ID of the resource group. |
60597 |
| Cu |
number |
The reserved compute units (CUs) of the resource group. |
1 |
| Image |
string |
The ID of the image used for the runtime configuration. |
i-xxxx |
| Trigger |
object |
The trigger configuration of the data quality scan. |
|
| Type |
string |
The trigger method of the data quality scan. Valid values:
|
BySchedule |
| TaskIds |
array |
The IDs of the scheduled tasks that trigger the data quality scan. This parameter is required when the trigger method is BySchedule. |
|
|
integer |
The ID of the scheduled task. |
1014217266 |
|
| Hooks |
array<object> |
The hook configuration after the data quality scan finishes. |
|
|
object |
The hook configuration after the data quality scan finishes. |
||
| Condition |
string |
The trigger condition of the hook. When this condition is met, the hook is triggered. Currently, only one expression format is supported:
|
results.any { r -> r.status == 'fail' && r.rule.severity == 'High' } |
| Type |
string |
The type of the hook. Valid values:
|
BlockTaskInstance |
| Parameters |
array<object> |
The parameter settings used during the actual run. |
|
|
object |
The parameter settings. |
||
| Value |
string |
The value of the parameter. |
$[yyyy-mm-dd-1] |
| Name |
string |
The name of the parameter. |
dt |
| Results |
array<object> |
The check results of each rule. |
|
|
array<object> |
The check result of the rule. |
||
| Status |
string |
The status of the check result. Valid values:
|
Fail |
| Details |
array<object> |
The details of the current check. |
|
|
object |
The details of the current check. |
||
| Status |
string |
The status of the final comparison result. Valid values:
|
Fail |
| ReferenceValue |
string |
The baseline value that is used to calculate the CheckedValue based on the referenced sample. |
0.0 |
| CheckValue |
string |
The final value used to compare with the threshold. |
100.0 |
| Sample |
string |
The sample value used for the current check. |
{ "value": "100.0" } |
| CreateTime |
integer |
The time when the check result was generated. The value is a UNIX timestamp in milliseconds. |
1725506795000 |
| Rule |
string |
The snapshot of the rule specification at the start of the check. |
{ "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
Success response
JSON format
{
"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": "{\n \"datasets\": [\n {\n \"type\": \"Table\",\n \"dataSource\": {\n \"name\": \"odps_first\",\n \"envType\": \"Prod\"\n },\n \"tables\": [\n \"ods_d_user_info\"\n ],\n \"filter\": \"pt = $[yyyymmdd-1]\"\n }\n ],\n \"rules\": [\n {\n \"assertion\": \"row_count > 0\"\n }, {\n \"templateId\": \"SYSTEM:field:null_value:fixed\",\n \"pass\": \"when = 0\",\n \"name\": \"The id cannot be empty.\",\n \"severity\": \"High\",\n \"identity\": \"a-customized-data-quality-rule-uuid\"\n }\n ]\n}",
"Parameters": [
{
"Value": "$[yyyy-mm-dd-1]",
"Name": "dt"
}
],
"ComputeResource": {
"Name": "emr_cluster_001",
"Runtime": {
"Engine": "Hive",
"SparkConf": {
"spark.yarn.queue": "dq_queue"
},
"HiveConf": {
"mapreduce.job.queuename": "dq_queue"
}
},
"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.0",
"CheckValue": "100.0"
}
],
"Sample": "{\n \"value\": \"100.0\"\n}\n",
"CreateTime": 1725506795000,
"Rule": "{\n \"templateId\": \"SYSTEM:field:null_value:fixed\",\n \"pass\": \"when = 0\",\n \"name\": \"The id cannot be empty.\",\n \"severity\": \"High\",\n \"identity\": \"a-customized-data-quality-rule-uuid\"\n}"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.