ListDataQualityResults
Lists data quality check results with pagination.
This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - ListDataQualityScanRuns for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
You must purchase DataWorks Basic Edition or higher to use this API.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
No |
The DataWorks workspace ID. |
100 |
| DataQualityRuleId |
integer |
No |
The data quality rule ID. |
100001 |
| DataQualityEvaluationTaskId |
integer |
No |
The data quality evaluation task ID. |
200001 |
| DataQualityEvaluationTaskInstanceId |
integer |
No |
The data quality evaluation task instance ID. |
10001 |
| CreateTimeFrom |
integer |
No |
The earliest time when the data quality check results were generated. |
1710239005403 |
| CreateTimeTo |
integer |
No |
The latest time when the data quality check results were generated. |
1710239005403 |
| BizdateFrom |
string |
No |
The start business date of the rule instance. |
2024-05-01 |
| BizdateTo |
string |
No |
The end business date of the rule instance. |
2024-05-04 |
| PageSize |
integer |
No |
The number of results per page. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| RequestId |
string |
The API request ID. |
691CA452-D37A-**** |
| PagingInfo |
object |
The paginated data quality check results. |
|
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of entries. |
219 |
| DataQualityResults |
array<object> |
The list of data quality check results. |
|
|
array<object> |
The quality check result. |
||
| Id |
integer |
The check result ID. |
16033 |
| Status |
string |
The status of the check result. Valid values:
|
Passed |
| CreateTime |
integer |
The time when the check result was generated. |
1708284916414 |
| TaskInstanceId |
integer |
The ID of the data quality evaluation task instance. |
200001 |
| Sample |
string |
The sample value used for this check. |
[ { "gender": "male", "_count": 100 }, { "gender": "female", "_count": 100 } ] |
| Details |
array<object> |
The details of this check. |
|
|
object |
The check detail. |
||
| ReferencedValue |
string |
The referenced sample value used as the baseline for calculating the checked value. |
0.0 |
| CheckedValue |
string |
The final value used for comparison with the threshold. |
100.0 |
| Status |
string |
The final comparison result status. Valid values:
|
Passed |
| Rule |
object |
The snapshot of the rule configuration at the start of the check. |
|
| Id |
integer |
The rule ID. |
100001 |
| Name |
string |
The rule name. The name can contain digits, letters, Chinese characters, and half-width or full-width punctuation marks. It can be up to 255 characters in length. |
The table cannot be empty. |
| ProjectId |
integer |
The DataWorks workspace ID. |
100 |
| Enabled |
boolean |
Specifies whether the rule is enabled. |
true |
| Severity |
string |
The severity level of the rule for the business, which corresponds to strong and weak rules on the page. Valid values:
|
Normal |
| Description |
string |
The description of the rule. It can be up to 500 characters in length. |
this is a odps _sql task |
| TemplateCode |
string |
The code of the rule template referenced when the rule was created. |
SYSTEM:user_defined_sql |
| Target |
object |
The object monitored by the rule. |
|
| Type |
string |
The type of the monitored object. Valid values:
|
Table |
| DatabaseType |
string |
The database type of the table dataset. Valid values:
|
maxcompute |
| TableGuid |
string |
The unique ID of the table in DataWorks Data Map. |
odps.unit_test.tb_unit_test |
| SamplingConfig |
object |
The settings required for sample collection. |
|
| Metric |
string |
The name of the sampling metric. Valid values:
|
Count |
| MetricParameters |
string |
The parameters required for sample collection. |
{ "columns": [ "id", "name" ] } |
| SettingConfig |
string |
The runtime parameter setting statements inserted before the sampling statement is executed. It can be up to 1,000 characters in length. Only MaxCompute is supported. |
SET odps.sql.udf.timeout=600s; |
| SamplingFilter |
string |
The conditions used to filter out unneeded data during sampling. It can be up to 16,777,215 characters in length. |
id IS NULL |
| CheckingConfig |
object |
The sample check settings. |
|
| Type |
string |
The threshold calculation method. Valid values:
|
Fixed |
| ReferencedSamplesFilter |
string |
The expression used to query reference samples for certain types of thresholds. The values of the reference samples are aggregated to obtain the threshold for comparison. |
{ "bizdate": [ "-1", "-7", "-1m" ] } |
| Thresholds |
object |
The threshold settings. |
|
| Expected |
object |
The expected threshold settings. |
|
| Value |
string |
The threshold value. |
100.0 |
| Operator |
string |
The comparison operator. Valid values:
|
> |
| Expression |
string |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
For fixed value rules, you can also use an expression to configure the threshold. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| Warned |
object |
The threshold settings for common warnings. |
|
| Value |
string |
The threshold value. |
100.0 |
| Operator |
string |
The comparison operator. Valid values:
|
> |
| Expression |
string |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
For fixed value rules, you can also use an expression to configure the threshold. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| Critical |
object |
The threshold settings for critical warnings. |
|
| Value |
string |
The threshold value. |
100.0 |
| Operator |
string |
The comparison operator. Valid values:
|
> |
| Expression |
string |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
For fixed value rules, you can also use an expression to configure the threshold. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| ErrorHandlers |
array<object> |
The error handlers for data quality rule checks. |
|
|
object |
The error handlers for data quality rule checks. |
||
| Type |
string |
The handler type. Valid values:
|
SaveErrorData |
| ErrorDataFilter |
string |
The SQL statement specified by the user to filter error data for custom SQL rules. |
SELECT * FROM tb_api_log WHERE id IS NULL |
Examples
Success response
JSON format
{
"RequestId": "691CA452-D37A-****",
"PagingInfo": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 219,
"DataQualityResults": [
{
"Id": 16033,
"Status": "Passed",
"CreateTime": 1708284916414,
"TaskInstanceId": 200001,
"Sample": "[\n {\n \"gender\": \"male\",\n \"_count\": 100\n }, {\n \"gender\": \"female\",\n \"_count\": 100\n }\n]",
"Details": [
{
"ReferencedValue": "0.0",
"CheckedValue": "100.0",
"Status": "Passed"
}
],
"Rule": {
"Id": 100001,
"Name": "The table cannot be empty.",
"ProjectId": 100,
"Enabled": true,
"Severity": "Normal",
"Description": "this is a odps _sql task",
"TemplateCode": "SYSTEM:user_defined_sql",
"Target": {
"Type": "Table",
"DatabaseType": "maxcompute",
"TableGuid": "odps.unit_test.tb_unit_test"
},
"SamplingConfig": {
"Metric": "Count",
"MetricParameters": "{ \"columns\": [ \"id\", \"name\" ] }",
"SettingConfig": "SET odps.sql.udf.timeout=600s; ",
"SamplingFilter": "id IS NULL"
},
"CheckingConfig": {
"Type": "Fixed",
"ReferencedSamplesFilter": "{ \"bizdate\": [ \"-1\", \"-7\", \"-1m\" ] }",
"Thresholds": {
"Expected": {
"Value": "100.0",
"Operator": ">",
"Expression": "$checkValue > 0.01"
},
"Warned": {
"Value": "100.0",
"Operator": ">",
"Expression": " $checkValue > 0.01"
},
"Critical": {
"Value": "100.0",
"Operator": ">",
"Expression": " $checkValue > 0.01"
}
}
},
"ErrorHandlers": [
{
"Type": "SaveErrorData\n",
"ErrorDataFilter": "SELECT * FROM tb_api_log WHERE id IS NULL"
}
]
}
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.