UpdateQualityRule
Updates the information 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. The strength indicates the importance of the rule. Valid values:
Valid values:
|
0 |
| EntityId |
integer |
No |
The ID of the partition expression. You can call the ListQualityRules operation to obtain the partition expression ID. |
123 |
| Comment |
string |
No |
The description of the quality rule. |
Verify the number of table rows |
| Checker |
integer |
No |
The ID of the checker. Valid values:
|
9 |
| ExpectValue |
string |
No |
The expected value of the check result. |
300 |
| Id |
integer |
Yes |
The ID of the quality rule. You can call the ListQualityRules operation to obtain 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 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. |
table_count |
| Operator |
string |
No |
The comparison operator. Valid values include >, >=, =, ≠, <, and <=. Note
If Checker is set to 9, this parameter is required. |
> |
| 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 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 by the check node. |
dt=$[yyyymmdd] |
| CriticalThreshold |
string |
No |
The red alert threshold. This value indicates the deviation from the expected sample value. You can customize this alert threshold based on your business requirements. If a strong rule is triggered and the red alert threshold is exceeded, the scheduling node is blocked. |
10 |
| WarningThreshold |
string |
No |
The orange alert threshold. This value indicates the deviation from the expected sample value. You can customize this alert threshold based on your business requirements. |
5 |
| TemplateId |
integer |
No |
The ID of the check template used. You can call the ListQualityRules operation to obtain the check template ID. |
7 |
| RuleName |
string |
No |
The name of the quality rule. |
123 |
| PredictType |
integer |
No |
Specifies whether the threshold is dynamic. Valid values:
|
0 |
| OpenSwitch |
boolean |
No |
The enabled or disabled status of the rule, which controls whether the quality rule runs in the production environment. Valid values:
|
true |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. |
26 |
| TaskSetting |
string |
No |
The variable settings inserted before the custom rule, in the format of x=a,y=b. |
x=a,y=b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data structure. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Data |
boolean |
Indicates whether the quality rule was updated. |
true |
| ErrorMessage |
string |
The error message. |
You have no permission. |
| RequestId |
string |
The request ID. You can use this ID to troubleshoot issues when errors occur. |
576b9457-2cf5-4**** |
| ErrorCode |
string |
The error code. |
0 |
| Success |
boolean |
Indicates whether the 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.