Call CreateQualityRule to create a Quality Rule.
This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - CreateDataQualityScan 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 |
Yes |
The strength of the rule. Valid values:
|
0 |
| EntityId |
integer |
Yes |
The ID of the partition filter expression. |
15224 |
| Comment |
string |
No |
The comments of the rule. |
Verification |
| Checker |
integer |
No |
The ID of the checker. Valid values:
|
9 |
| ExpectValue |
string |
No |
The expected value. |
0 |
| Trend |
string |
No |
The trend of the check result. Valid values:
|
abs |
| MethodName |
string |
No |
The check method. If you use a custom SQL statement, set this parameter to |
count/table_count |
| Operator |
string |
No |
The comparison operator. Examples: Note
If you set the Checker parameter to 9, you must specify the Operator parameter. |
> |
| ProjectName |
string |
Yes |
The name of the compute engine or data source. |
autotest |
| Property |
string |
No |
The field that is monitored by the rule. To perform a table-level check, set this parameter to |
table_id |
| PropertyType |
string |
No |
The data type of the field. For a table-level check, set this parameter to |
bigint |
| RuleType |
integer |
Yes |
The type of the rule. Valid values:
|
0 |
| WhereCondition |
string |
No |
The filter condition or custom SQL statement. |
table_id>1 |
| CriticalThreshold |
string |
No |
The critical threshold. It indicates the deviation of the check result from the expected value. You can customize this threshold based on your business requirements. If a strong rule is used and a critical alert is triggered, the scheduling task is blocked. |
20 |
| WarningThreshold |
string |
No |
The warning threshold. It indicates the deviation of the check result from the expected value. You can customize this threshold based on your business requirements. |
10 |
| TemplateId |
integer |
No |
The ID of the template. |
7 |
| RuleName |
string |
Yes |
The name of the rule. |
1234 |
| PredictType |
integer |
Yes |
Specifies whether to use a dynamic threshold. Valid values: |
0 |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace Management page to obtain the workspace ID. |
10000 |
| TaskSetting |
string |
No |
The variable settings that are inserted before the custom rule. Format: x=a,y=b. |
x=a,y=b |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Data |
string |
The ID of the new rule. |
12345 |
| ErrorMessage |
string |
The error message. |
You have no permission. |
| RequestId |
string |
The request ID. |
ecb967ec-c137-48**** |
| ErrorCode |
string |
The error code. |
401 |
| Success |
boolean |
Whether the request succeeded. |
true |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"Data": "12345",
"ErrorMessage": "You have no permission.",
"RequestId": "ecb967ec-c137-48****",
"ErrorCode": "401",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.