Checks data source quality against monitoring rules and returns the check results.
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.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RuleId |
integer |
Yes |
The monitoring rule ID. Use with a partition filter to query monitoring results. |
152322134 |
| StartDate |
string |
Yes |
The start of the query time range. Format: Required with EndDate. The time range cannot exceed 7 days. |
2020-09-20 00:00:00 |
| EndDate |
string |
Yes |
The end of the query time range. Format: Required with StartDate. The time range cannot exceed 7 days. |
2020-09-22 00:00:00 |
| PageSize |
integer |
Yes |
Entries per page. Default: 10. Maximum: 20. |
10 |
| PageNumber |
integer |
Yes |
Page number. |
1 |
| ProjectName |
string |
Yes |
The compute engine or data source name for data quality monitoring. |
autotest |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. |
123456 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The check result object. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| ErrorMessage |
string |
The error message. |
You have no permission. |
| RequestId |
string |
The request ID. |
CBA58543-00D4-41**** |
| ErrorCode |
string |
The error code. |
401 |
| Success |
boolean |
Whether the request was successful. |
true |
| Data |
object |
The top-level check result object. |
|
| PageNumber |
integer |
Page number. |
1 |
| PageSize |
integer |
Entries per page. Default: 10. Maximum: 100. |
10 |
| TotalCount |
integer |
Total number of records. |
200 |
| RuleChecks |
array<object> |
List of check results. |
|
|
array<object> |
A check result entry. |
||
| BlockType |
integer |
The rule strength. A strong rule blocks downstream scheduling tasks when a critical alert triggers. Valid values:
|
1 |
| WarningThreshold |
number |
The custom warning alert threshold. An alert triggers if the deviation from the expected value exceeds this threshold. |
0.1 |
| Property |
string |
The source table column checked by the rule. |
type |
| TableName |
string |
The name of the checked table. |
dual |
| Comment |
string |
The monitoring rule description. |
The description of the rule. |
| CheckResultStatus |
integer |
The check result status. |
2 |
| TemplateName |
string |
The rule template name. |
Expected value verification |
| CheckerName |
string |
The checker name. |
fulx |
| RuleId |
integer |
The rule ID. |
123421 |
| FixedCheck |
boolean |
Whether a fixed-value check is used. Valid values:
|
false |
| Op |
string |
The comparison operator. |
> |
| UpperValue |
number |
The predicted upper limit, auto-generated based on the configured threshold. |
22200 |
| ActualExpression |
string |
The actual data partition checked. |
ds=20200925 |
| ExternalId |
string |
The scheduling task node ID. |
123112232 |
| TimeCost |
string |
The check duration. |
10 |
| Trend |
string |
The check result trend. |
up |
| ExternalType |
string |
The scheduling system type. Only CWF is supported. |
CWF2 |
| BizDate |
integer |
The business date. For offline tables, typically the day before the check runs. |
1600704000000 |
| CheckResult |
integer |
The check result. |
2 |
| ResultString |
string |
The string representation of the check result. |
ResultString |
| MatchExpression |
string |
The partition filter expression. |
ds=$[yyyymmdd] |
| CheckerType |
integer |
The checker type. |
0 |
| ProjectName |
string |
The engine or data source name used for the quality check. |
autotest |
| BeginTime |
integer |
The check start time. |
1600704000000 |
| DateType |
string |
The scheduling cycle. For example, |
YMD |
| CriticalThreshold |
number |
The critical alert threshold. For strong rules, exceeding this threshold blocks downstream scheduling tasks. |
0.6 |
| IsPrediction |
boolean |
Whether the result is a prediction. Valid values:
|
false |
| RuleName |
string |
The rule name. |
The name of the rule. |
| CheckerId |
integer |
The checker ID. |
7 |
| DiscreteCheck |
boolean |
Whether a discrete value check is used. Valid values:
|
true |
| EndTime |
integer |
The check end time. |
1600704000000 |
| MethodName |
string |
The sample data collection method. Examples: |
max |
| LowerValue |
number |
The predicted lower limit, auto-generated based on the configured threshold. |
2344 |
| EntityId |
integer |
The partition filter expression ID. |
14534343 |
| WhereCondition |
string |
The check filter condition. |
type!='type2' |
| ExpectValue |
number |
The expected value. |
90 |
| TemplateId |
integer |
The rule template ID. |
5 |
| TaskId |
string |
The check task ID. |
16008552981681a0d6**** |
| Id |
integer |
The primary key ID. |
2231123 |
| ReferenceValue |
array<object> |
The historical sample values. |
|
|
object |
A historical sample. |
||
| DiscreteProperty |
string |
The grouped column value after applying |
type1 |
| Value |
number |
The sample value. |
20 |
| BizDate |
string |
The business date. For offline tables, typically the day before the check runs. |
1600704000000 |
| SingleCheckResult |
integer |
The single check result. |
2 |
| Threshold |
number |
The threshold. |
0.2 |
| SampleValue |
array<object> |
The current sample values. |
|
|
object |
A current sample. |
||
| DiscreteProperty |
string |
The grouped column value after applying |
type2 |
| BizDate |
string |
The business date. For offline tables, typically the day before the check runs. |
1600704000000 |
| Value |
number |
The sample value. |
23 |
| Open |
boolean |
Whether the rule is enabled. |
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"ErrorMessage": "You have no permission.",
"RequestId": "CBA58543-00D4-41****",
"ErrorCode": "401",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 200,
"RuleChecks": [
{
"BlockType": 1,
"WarningThreshold": 0.1,
"Property": "type",
"TableName": "dual",
"Comment": "The description of the rule.",
"CheckResultStatus": 2,
"TemplateName": "Expected value verification",
"CheckerName": "fulx",
"RuleId": 123421,
"FixedCheck": false,
"Op": ">",
"UpperValue": 22200,
"ActualExpression": "ds=20200925",
"ExternalId": "123112232",
"TimeCost": "10",
"Trend": "up",
"ExternalType": "CWF2",
"BizDate": 1600704000000,
"CheckResult": 2,
"ResultString": "ResultString",
"MatchExpression": "ds=$[yyyymmdd]",
"CheckerType": 0,
"ProjectName": "autotest",
"BeginTime": 1600704000000,
"DateType": "YMD",
"CriticalThreshold": 0.6,
"IsPrediction": false,
"RuleName": "The name of the rule.",
"CheckerId": 7,
"DiscreteCheck": true,
"EndTime": 1600704000000,
"MethodName": "max",
"LowerValue": 2344,
"EntityId": 14534343,
"WhereCondition": "type!='type2'",
"ExpectValue": 90,
"TemplateId": 5,
"TaskId": "16008552981681a0d6****",
"Id": 2231123,
"ReferenceValue": [
{
"DiscreteProperty": "type1",
"Value": 20,
"BizDate": "1600704000000",
"SingleCheckResult": 2,
"Threshold": 0.2
}
],
"SampleValue": [
{
"DiscreteProperty": "type2",
"BizDate": "1600704000000",
"Value": 23
}
],
"Open": true
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.