CreateDataQualityRuleTemplate
Creates a rule template.
This API has been deprecated. We recommend migrating to dataworks-public(2024-05-18) - CreateDataQualityTemplate for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.
Operation description
You must purchase DataWorks Basic Edition or a higher edition to use this feature.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the rule template. The name can contain digits, letters, Chinese characters, and half-width or full-width punctuation marks. The name can be up to 512 characters in length. |
Table row Count Verification |
| ProjectId |
integer |
Yes |
The DataWorks workspace ID. |
12345 |
| VisibleScope |
string |
No |
The visibility scope of the template. Valid values:
Valid values:
|
Project |
| DirectoryPath |
string |
No |
The directory path where the custom template is stored. Levels are separated by forward slashes (/). Each level name can be up to 1024 characters in length and cannot contain whitespace characters or forward slashes. |
/ods/order_data |
| SamplingConfig |
object |
Yes |
The settings required for sample collection. |
|
| Metric |
string |
No |
The name of the sampling metric. Valid values:
|
Count |
| MetricParameters |
string |
Yes |
The parameters required for sample collection. |
{"SQL": "select count(1) from table;"} |
| SettingConfig |
string |
No |
The runtime parameter setting statements to execute before the sampling statement. The value can be up to 1000 characters in length. Currently, only MaxCompute is supported. |
SET odps.sql.udf.timeout=600s; SET odps.sql.python.version=cp27; |
| CheckingConfig |
object |
No |
The sample verification settings. |
|
| Type |
string |
Yes |
The threshold calculation method. Valid values:
|
Fixed |
| ReferencedSamplesFilter |
string |
No |
An expression that specifies how to query reference samples. Some threshold types require querying reference samples and then aggregating their values to derive the threshold for comparison. |
{ "bizdate": [ "-1", "-7", "-1m" ] } |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
691CA452-D37A-4ED0-9441 |
| Code |
string |
The code of the rule template. |
UserDefined:3001 |
Examples
Success response
JSON format
{
"RequestId": "691CA452-D37A-4ED0-9441\n",
"Code": "UserDefined:3001"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.