ListQualityRules
Queries the list of quality rules based on a partition expression.
This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - GetDataQualityScan 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
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:* |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectName |
string |
Yes |
The name of the engine or data source. You can obtain the name from the data source configuration. |
autotest |
| EntityId |
integer |
Yes |
The ID of the partition expression. You can call the GetQualityEntity operation to obtain the ID. |
12345 |
| PageNumber |
integer |
Yes |
The page number. |
1 |
| PageSize |
integer |
Yes |
The number of entries to return on each page. Default value: 10. Maximum value: 20. |
20 |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. |
12345 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID, which is used for troubleshooting. |
38cbdef0-f6cf-49**** |
| ErrorMessage |
string |
The error message. |
You have no permission. |
| Success |
boolean |
Specifies whether the call was successful. Valid values:
|
true |
| ErrorCode |
string |
The error code. |
Invalid.Tenant.ConnectionNotExists |
| Data |
object |
The list of rules. |
|
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned on each page. Default value: 10. Maximum value: 20. |
20 |
| TotalCount |
integer |
The total number of returned entries. |
400 |
| Rules |
array<object> |
The details of the quality rules. |
|
|
object |
The data structure of the returned rule. |
||
| BlockType |
integer |
The severity of the quality rule, which indicates the importance of the rule. Valid values:
|
0 |
| OnDutyAccountName |
string |
The name of the Alibaba Cloud account that configured the quality rule. |
test |
| Property |
string |
The name of the field. |
id |
| WarningThreshold |
string |
The orange alert threshold. This threshold indicates the deviation from the expected value of the sample. You can customize alert threshold based on your business requirements. |
10 |
| TableName |
string |
The name of the table. |
dual |
| OnDuty |
string |
The ID of the account that configured the quality rule. |
1912**** |
| Comment |
string |
The description of the rule. |
Verify table rules |
| RuleCheckerRelationId |
integer |
The internal association ID of the rule details. |
132323 |
| FixCheck |
boolean |
The fixed value check. |
true |
| MethodId |
integer |
The ID of the method used to collect sample data. |
21 |
| TemplateName |
string |
The name of the quality rule template used. |
Number of SQL task table rows, 1, 7, and 30 days wave detection |
| Trend |
string |
The trend of the check result. |
abs |
| HistoryWarningThreshold |
string |
The historical orange alert threshold. |
history max:40%,history min:10% |
| RuleType |
integer |
The type of the rule. Valid values:
|
0 |
| MatchExpression |
string |
The partition expression. |
dt=$[yyyymmdd] |
| ProjectName |
string |
The name of the engine or data source. |
autotest |
| PropertyKey |
string |
The property key used for frontend rule linkage in Data Quality. You can ignore this field. |
table_count |
| CriticalThreshold |
string |
The red alert threshold. This threshold indicates the deviation from the expected value of the sample. You can customize this threshold based on your business requirements. If a strong rule is used and the alert threshold is triggered, the scheduling node is blocked. |
40 |
| HistoryCriticalThreshold |
string |
The historical red alert threshold. |
history max:80%,history min:50% |
| MethodName |
string |
The name of the method used to collect sample data. Valid values include avg, count, sum, min, max, count_distinct, user_defined, table_count, table_size, table_dt_load_count, table_dt_refuseload_count, null_value, null_value/table_count, (table_count-count_distinct)/table_count, and table_count-count_distinct. |
count/table_count |
| CheckerId |
integer |
The ID of the checker. |
7 |
| EntityId |
integer |
The ID of the partition expression. |
1234 |
| ExpectValue |
string |
The expected value. |
1000 |
| TemplateId |
integer |
The ID of the quality rule template used. |
7 |
| Id |
integer |
The ID of the rule. |
1234 |
| RuleName |
string |
The name of the rule. |
test |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "38cbdef0-f6cf-49****",
"ErrorMessage": "You have no permission.",
"Success": true,
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Data": {
"PageNumber": 1,
"PageSize": 20,
"TotalCount": 400,
"Rules": [
{
"BlockType": 0,
"OnDutyAccountName": "test",
"Property": "id",
"WarningThreshold": "10",
"TableName": "dual",
"OnDuty": "1912****",
"Comment": "Verify table rules",
"RuleCheckerRelationId": 132323,
"FixCheck": true,
"MethodId": 21,
"TemplateName": "Number of SQL task table rows, 1, 7, and 30 days wave detection",
"Trend": "abs",
"HistoryWarningThreshold": "history max:40%,history min:10%",
"RuleType": 0,
"MatchExpression": "dt=$[yyyymmdd]",
"ProjectName": "autotest",
"PropertyKey": "table_count",
"CriticalThreshold": "40",
"HistoryCriticalThreshold": "history max:80%,history min:50%",
"MethodName": "count/table_count",
"CheckerId": 7,
"EntityId": 1234,
"ExpectValue": "1000",
"TemplateId": 7,
"Id": 1234,
"RuleName": "test"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.