CreateDataQualityEvaluationTask
Creates a DataWorks data quality monitoring task.
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.
Operation description
You must purchase DataWorks Basic Edition or later to use this feature.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Target |
object |
Yes |
The monitored object for the data quality monitoring task. |
|
| DatabaseType |
string |
Yes |
The database type of the table. Valid values:
|
maxcompute |
| TableGuid |
string |
Yes |
The unique ID of the table in DataWorks Data Map. |
odps.api_test.ods_openapi_log_d |
| PartitionSpec |
string |
No |
The partition settings for the partitioned table. |
pt=$[yyyymmdd-1] |
| Description |
string |
No |
The description of the data quality monitoring task. |
OpenAPI create a data quality monitoring test |
| Name |
string |
Yes |
The name of the data quality monitoring task. |
OpenAPI create a data quality monitoring test |
| RuntimeConf |
string |
No |
The extension configurations in JSON string format. This parameter takes effect only for EMR data quality monitoring tasks.
|
{ "queue": "default", "sqlEngine": "SPARK_SQL" } |
| Trigger |
object |
No |
The trigger configuration for the data quality check task. |
|
| Type |
string |
No |
The trigger type for the data quality monitoring task. Valid values:
|
ByScheduledTaskInstance |
| TaskIds |
array |
No |
The list of scheduled task IDs. This parameter takes effect only when Type is set to ByScheduledTaskInstance. |
|
|
integer |
No |
The ID of the scheduled task. |
30001 |
|
| ProjectId |
integer |
Yes |
The ID of the DataWorks workspace. You can log on to the DataWorks console and go to the Workspace Management page to obtain the ID. This parameter is used to determine the DataWorks workspace used to invoke this API operation. |
10000 |
| Hooks |
array<object> |
No |
The hook settings. |
|
|
object |
No |
Hook |
||
| Type |
string |
No |
The hook type. Only one type is supported:
|
BlockTaskInstance |
| Condition |
string |
No |
The trigger condition for the hook. When this condition is met, the hook action is triggered. Two conditional expressions are supported:
|
(${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error") |
| Notifications |
object |
No |
The notification subscription configuration. |
|
| Condition |
string |
No |
The trigger condition for notifications. When this condition is met, a message notification is triggered. Two conditional expressions are supported: Specify only one group of rule severity and check status. Example: |
(${severity} == "High" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Critical") OR (${severity} == "Normal" AND ${status} == "Error") |
| Notifications |
array<object> |
No |
The notification settings. |
|
|
array<object> |
No |
The notification settings. |
||
| NotificationReceivers |
array<object> |
No |
The alert recipient settings. |
|
|
object |
No |
The alert recipient settings. |
||
| ReceiverType |
string |
No |
The type of the alert recipient. Valid values:
|
DingdingUrl |
| Extension |
string |
No |
The additional parameter settings in JSON format when an alert is sent. Supported keys:
|
{ "atAll": true } |
| ReceiverValues |
array |
No |
The alert recipients. |
|
|
string |
No |
The value of the recipient.
|
https://api.fc.aliyuncs.com/webhook |
|
| NotificationChannels |
array<object> |
No |
The notification methods. |
|
|
object |
No |
The notification methods. |
||
| Channels |
array |
No |
The notification methods. |
|
|
string |
No |
The alert methods. Valid values:
|
|
|
| DataSourceId |
integer |
Yes |
The ID of the data source. You can call the ListDataSources operation to query the ID of the data source. |
1 |
| DataQualityRules |
array<object> |
No |
The list of data quality rules associated with the data quality monitoring task. If DataQualityRule.Id is specified, the rule corresponding to the ID is associated with the new quality monitoring task. If it is not specified, a new rule is created by using other fields and associated with the new quality monitoring task. |
|
|
array<object> |
No |
|||
| Name |
string |
No |
The name of the data quality rule. |
OpenAPI test rules |
| Enabled |
boolean |
No |
Specifies whether the quality rule is enabled. |
true |
| Severity |
string |
No |
The severity level of the rule for the business, which corresponds to strong and weak rules on the page. Valid values:
Valid values:
|
High |
| Description |
string |
No |
The description of the data quality rule. |
OpenAPI test rules |
| TemplateCode |
string |
No |
The unique identifier of the rule template referenced by the rule. |
SYSTEM:field:null_value:fixed:0 |
| SamplingConfig |
object |
No |
The parameters required for sample collection. |
|
| Metric |
string |
No |
The name of the sampling metric. Valid values:
|
NullValueCount |
| MetricParameters |
string |
No |
The parameters required for sample collection. |
{ "Columns": [ "id", "name" ] , "SQL": "select count(1) from table;"} |
| SettingConfig |
string |
No |
The runtime parameter setting statements inserted before the sampling statements are executed. The maximum length is 1,000 characters. Only MaxCompute is supported. |
odps.sql.type.system.odps2=True,odps.sql.hive.compatible=True |
| SamplingFilter |
string |
No |
The conditions for secondary filtering of irrelevant data during sampling. The maximum length is 16,777,215 characters. |
status != 'Succeeded' |
| CheckingConfig |
object |
No |
The sample verification settings. |
|
| Type |
string |
No |
The threshold calculation method. Valid values:
|
Fixed |
| ReferencedSamplesFilter |
string |
No |
The expression that represents the query method for reference samples. Some types of thresholds require querying reference samples and aggregating their values to obtain the threshold for comparison. |
{"bizdate": ["-1"]} |
| Thresholds |
object |
No |
The verification threshold settings. |
|
| Expected |
object |
No |
The expected threshold settings. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
= |
| Value |
string |
No |
The threshold value. |
0 |
| Expression |
string |
No |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| Warned |
object |
No |
The threshold settings for common warnings. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
> |
| Value |
string |
No |
The threshold value. |
0.001 |
| Expression |
string |
No |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| Critical |
object |
No |
The threshold settings for critical warnings. |
|
| Operator |
string |
No |
The comparison operator. Valid values:
|
> |
| Value |
string |
No |
The threshold value. |
0.01 |
| Expression |
string |
No |
The threshold expression. For fluctuation rules, you must use an expression to represent the fluctuation threshold. Examples:
Fixed value rules can also use expressions to configure thresholds. If both are configured, the expression takes precedence over Operator and Value. |
$checkValue > 0.01 |
| ErrorHandlers |
array<object> |
No |
The list of error handlers for quality rule verification. |
|
|
object |
No |
The error handler for quality rule verification. |
||
| Type |
string |
No |
The handler type. Valid values:
|
SaveErrorData |
| ErrorDataFilter |
string |
No |
The SQL statement specified by the user to filter problematic data if the rule is a custom SQL rule. |
SELECT * FROM ods_api_log WHERE status = 'Error'; |
| Id |
integer |
No |
The rule ID. |
2176 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
Id of the request |
2d9ce-38ef-4923-baf6-391a7e656 |
| Id |
integer |
The ID of the newly created data quality monitoring task. |
10001 |
Examples
Success response
JSON format
{
"RequestId": "2d9ce-38ef-4923-baf6-391a7e656",
"Id": 10001
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.