Gets data quality monitoring details.
Operation description
DataWorks Basic Edition or a higher edition is required.
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 monitor. |
10001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
204EAF68-CCE3-5112-8DA0-E7A60F02XXXX |
| DataQualityScan |
object |
Data quality monitoring details. |
|
| Id |
integer |
The data quality monitoring ID. |
10001 |
| Name |
string |
The data quality monitor name. |
data_quality_scan_001 |
| Description |
string |
The data quality monitor description. |
aily data quality scanning of ods tables. |
| ProjectId |
integer |
The workspace ID where the data quality monitor resides. You can obtain the workspace ID by calling the ListProjects operation. |
101 |
| CreateTime |
integer |
The creation time of the data quality monitor. |
1731550150000 |
| ModifyTime |
integer |
Last modified time of the data quality monitor. |
1731550150000 |
| CreateUser |
string |
The ID of the user who creates the data quality monitor. |
2374924198591250 |
| ModifyUser |
string |
The ID of the user who last modifies the data quality monitor. |
23482597582479 |
| Owner |
string |
The ID of the user who owns the data quality monitor. |
231263586109857423 |
| Spec |
string |
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" } ] } |
| Parameters |
array<object> |
The definition of execution parameters for the data quality monitor. |
|
|
object |
The parameter information. |
||
| Value |
string |
The parameter name. |
10 |
| Name |
string |
The parameter value. |
e2e_autolabel |
| ComputeResource |
object |
The compute engine used at runtime. Optional. If not specified, the data source defined in the Spec is used. |
|
| Name |
string |
The name of the compute engine, which is a unique identifier. |
polardb_to_holo |
| Runtime |
object |
More settings for data quality monitor at runtime. |
|
| Engine |
string |
The type of the compute engine. Only EMR compute engines support these settings. Valid values:
|
Hive |
| HiveConf |
object |
Additional Hive engine parameters. Currently, only the mapreduce.job.queuename parameter is supported. |
mapreduce.job.queuename=dq_queue |
| SparkConf |
object |
Additional Spark engine parameters. Currently, only the spark.yarn.queue parameter is supported. |
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 during the running of the data quality monitor. |
|
| Id |
string |
The resource group ID. |
122878 |
| Cu |
number |
Reserved compute units (CU) for the resource group. |
10 |
| Image |
string |
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 |
| Trigger |
object |
The trigger configurations of the data quality monitoring task. |
|
| Type |
string |
The trigger mode of the monitoring task. Valid values:
|
BySchedule |
| TaskIds |
array |
If the trigger mode is set to BySchedule, the scheduling task ID must be specified. |
|
|
integer |
The ID of the scheduling task. |
1023777390 |
|
| Hooks |
array<object> |
The Hook configurations after the data quality monitoring run ends. |
|
|
object |
The Hook configurations after the data quality monitoring run ends. |
||
| Condition |
string |
The Hook trigger condition. The hook will run if the condition is met. Currently, only one type of 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": {
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.