GetDataQualityScan
Retrieves the details of a data quality scan.
Operation description
You must purchase DataWorks Basic Edition or higher to use this feature.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetDataQualityScan |
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. You can obtain the ID from the PageInfo.DataQualityScans[].Id parameter returned by the ListDataQualityScans operation. |
10001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response result. |
||
| RequestId |
string |
The request ID. |
204EAF68-CCE3-5112-8DA0-E7A60F02XXXX |
| DataQualityScan |
object |
The details of the data quality scan. |
|
| Id |
integer |
The ID of the data quality scan. |
10001 |
| Name |
string |
The name of the data quality scan. |
data_quality_scan_001 |
| Description |
string |
The description of the data quality scan. |
aily data quality scanning of ods tables. |
| ProjectId |
integer |
The ID of the DataWorks workspace to which the data quality scan belongs. You can obtain the workspace ID by calling the ListProjects operation. |
101 |
| CreateTime |
integer |
The time when the data quality scan was created. The value is a UNIX timestamp in milliseconds. |
1731550150000 |
| ModifyTime |
integer |
The time when the data quality scan was last modified. The value is a UNIX timestamp in milliseconds. |
1731550150000 |
| CreateUser |
string |
The ID of the user who created the data quality scan. |
2374924198591250 |
| ModifyUser |
string |
The ID of the user who last modified the data quality scan. |
23482597582479 |
| Owner |
string |
The ID of the owner of the data quality scan. |
231263586109857423 |
| Spec |
string |
The spec code of the data quality scan. For more information, see Data quality spec 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 execution parameters defined for the data quality scan. |
|
|
object |
The parameter information. |
||
| Value |
string |
The value of the parameter. |
10 |
| Name |
string |
The name of the parameter. |
e2e_autolabel |
| ComputeResource |
object |
The compute engine used when the data quality scan runs. This parameter can be left empty. If it is not specified, the data source connection specified in the spec is used. |
|
| Name |
string |
The name of the compute engine, which serves as a unique identifier. |
polardb_to_holo |
| Runtime |
object |
The additional settings for the data quality scan at runtime. |
|
| Engine |
string |
The type of the engine used. Only the E-MapReduce (EMR) compute engine supports this setting. Valid values:
|
Hive |
| HiveConf |
object |
The additional 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 |
object |
The additional 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"} |
| EnvType |
string |
The workspace environment to which the compute engine belongs. Valid values:
|
Prod |
| RuntimeResource |
object |
The resource group used when the data quality scan runs. |
|
| Id |
string |
The ID of the resource group. |
122878 |
| Cu |
number |
The reserved compute units (CUs) of the resource group. |
10 |
| Image |
string |
The ID of the image used for the runtime configuration. |
hp-tlp-e2e-repo-registry-vpc.cn-heyuan-acdr-1.cr.aliyuncs.com/hp-service/worker:9b28b6d-202506091008 |
| 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 nodes that trigger the data quality scan when the trigger method is set to BySchedule. |
|
|
integer |
The ID of the scheduled node. |
1023777390 |
|
| Hooks |
array<object> |
The hook configuration after the data quality scan finishes running. |
|
|
object |
The hook configuration after the data quality scan 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:
|
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 type of the hook. Valid values:
|
BlockTaskInstance |
Examples
Success response
JSON format
{
"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": "231263586109857423",
"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": "10",
"Name": "e2e_autolabel"
}
],
"ComputeResource": {
"Name": "polardb_to_holo",
"Runtime": {
"Engine": "Hive",
"HiveConf": {
"mapreduce.job.queuename": "dq_queue"
},
"SparkConf": {
"spark.yarn.queue": "dq_queue"
}
},
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.