Updates a specified 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. You can specify a rule as a strong or weak rule based on the importance of the 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 name of the method used to collect sample data. 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 log on to the DataWorks console and go to the Workspace Management page to obtain the name. |
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 that is used for the check. |
dt=$[yyyymmdd] |
| CriticalThreshold |
string |
No |
The threshold for a critical alert. The threshold specifies the deviation of a check result from the expected value. You can customize the threshold based on your business requirements. 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. The threshold specifies the deviation of a check result from the expected value. You can customize the threshold based on your business requirements. |
5 |
| TemplateId |
integer |
No |
The ID of the template that is used for the check. 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 use a dynamic threshold. Valid values:
|
0 |
| OpenSwitch |
boolean |
No |
Specifies whether to enable or disable the quality rule. This parameter specifies whether to run the quality rule in the production environment.
|
true |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. |
26 |
| TaskSetting |
string |
No |
The variable settings that are inserted before a custom rule. The settings are 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 validation rule was successfully updated. |
true |
| ErrorMessage |
string |
The error message returned when the request fails. |
You have no permission. |
| RequestId |
string |
The ID of the request, used for troubleshooting. |
576b9457-2cf5-4**** |
| ErrorCode |
string |
The error code returned when the request fails. |
0 |
| Success |
boolean |
Indicates whether the API call 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.