Updates the configuration of a quality rule.
This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - UpdateDataQualityScan 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 |
| BlockType |
integer |
No |
The strength of the quality rule. Valid values:
|
0 |
| EntityId |
integer |
No |
The ID of the partition filter expression. You can call the ListQualityRules operation to query the ID of the partition filter expression. |
123 |
| Comment |
string |
No |
The description of the quality rule. |
Verify the number of table rows |
| Checker |
integer |
No |
The checker ID. You can call the ListQualityRules operation to query the checker ID. |
9 |
| ExpectValue |
string |
No |
The expected value. |
300 |
| Id |
integer |
Yes |
The rule ID. You can call the ListQualityRules operation to query the rule ID. |
1234 |
| Trend |
string |
No |
The trend of the check result. Valid values:
|
up |
| MethodName |
string |
Yes |
The sampling method. Valid values: 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. |
table_count |
| Operator |
string |
No |
The comparison operator. Valid values: >, >=, =, !=, <, and <=. Note
This parameter is required if you set the Checker parameter to 9. |
> |
| ProjectName |
string |
Yes |
The name of the engine or data source. You can obtain the name on the Workspace Management page of the DataWorks console. |
autotest |
| Property |
string |
Yes |
The name of the field. |
id |
| PropertyType |
string |
No |
The data type of the field. |
bigint |
| RuleType |
integer |
No |
The type of the rule. Valid values:
|
0 |
| WhereCondition |
string |
No |
The filter condition or custom SQL statement used for the check. |
dt=$[yyyymmdd] |
| CriticalThreshold |
string |
No |
The threshold for a critical alert, which specifies the maximum deviation of a check result from the expected value. If you use a strong rule and a critical alert is triggered, the scheduling of the associated task is blocked. |
10 |
| WarningThreshold |
string |
No |
The threshold for a warning alert, which specifies the maximum deviation of a check result from the expected value. |
5 |
| TemplateId |
integer |
No |
The check template ID. You can call the ListQualityRules operation to query the template ID. |
7 |
| RuleName |
string |
No |
The name of the quality rule. |
123 |
| PredictType |
integer |
No |
Specifies whether to enable a dynamic threshold. Valid values:
|
0 |
| OpenSwitch |
boolean |
No |
Specifies whether to enable the quality rule in the production environment.
|
true |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. |
26 |
| TaskSetting |
string |
No |
The variable settings prepended to a custom rule, in the format of x=a,y=b. |
x=a,y=b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Data |
boolean |
Indicates whether the quality rule was successfully updated. |
true |
| ErrorMessage |
string |
The error message returned if the request failed. |
You have no permission. |
| RequestId |
string |
The request ID. You can use this ID for troubleshooting. |
576b9457-2cf5-4**** |
| ErrorCode |
string |
The error code returned if the request failed. |
0 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"Data": true,
"ErrorMessage": "You have no permission.",
"RequestId": "576b9457-2cf5-4****",
"ErrorCode": "0",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.