DataQualityResult

Updated at:

Parameter

Type

Description

Example

object

The data quality check results.

Id

integer

The ID of the check result.

10001

Status

string

The status of the check result.

Passed

TaskInstanceId

integer

The ID of the instance generated by the check.

20001

Rule

object

The snapshot of the rule configuration when the check starts.

Id

integer

The rule ID.

100001

Name

string

The name of the rule. The name can be up to 255 characters in length and can contain digits, English letters, Chinese characters, and half-width or full-width punctuation marks.

The table must not be empty

TenantId

integer

The DataWorks tenant ID.

1

ProjectId

integer

The DataWorks workspace ID.

100

Enabled

boolean

Indicates whether the rule is enabled.

true

Severity

string

The strength of the rule.

High

Description

string

The description of the rule. The description can be up to 500 characters in length.

this is a odps _sql task

Target

object

The monitored object of the rule.

Type

string

The type of the monitored object. Valid values:

  • Table

Table

DatabaseType

string

The type of the database to which the table belongs. Valid values:

  • maxcompute

  • emr

  • cdh

  • hologres

  • analyticdb_for_postgresql

  • analyticdb_for_mysql

  • starrocks

maxcompute

TableGuid

string

The ID of the table in Data Map.

odps.unit_test.tb_unit_test

PartitionSpec

string

The configuration of the partitioned table.

ds=$[yyyymmdd-1]

TemplateCode

string

The template used by the rule.

SYSTEM:user_defined_sql

SamplingConfig

object

The sampling settings.

Metric

string

The metrics used for sampling. Valid values:

  • Count: the number of rows in the table.

  • Min: the minimum value of the field.

  • Max: the maximum value of the field.

  • Avg: the average value of the field.

  • DistinctCount: the number of unique values of the field after deduplication.

  • DistinctPercent: the proportion of the number of unique values of the field after deduplication to the number of rows in the table.

  • DuplicatedCount: the number of duplicated values of the field.

  • DuplicatedPercent: the proportion of the number of duplicated values of the field to the number of rows in the table.

  • TableSize: the table size.

  • NullValueCount: the number of rows in which the field value is null.

  • NullValuePercent: the proportion of the number of rows in which the field value is null to the number of rows in the table.

  • GroupCount: the field value and the number of rows for each field value.

  • CountNotIn: the number of rows in which the field values are different from the referenced values that you specified in the rule.

  • CountDistinctNotIn: the number of unique values that are different from the referenced values that you specified in the rule after deduplication.

  • UserDefinedSql: indicates that data is sampled by executing custom SQL statements.

Min

MetricParameters

string

The parameters required for sampling.

{ "Columns": [ "id", "name" ] }

SettingConfig

string

The statements that are used to configure the parameters required for sampling before you execute the sampling statements. The statements can be up to 1,000 characters in length. Only the MaxCompute database is supported.

SET odps.sql.udf.timeout=600s;

SamplingFilter

string

The statements that are used to filter unnecessary data during sampling. The statements can be up to 16,777,215 characters in length.

id IS NULL

CheckingConfig

object

The check settings for sample data.

Type

string

The threshold calculation method. Valid values:

  • Fixed

  • Fluctation

  • FluctationDiscreate

  • Auto

  • Average

  • Variance

Fixed

ReferencedSamplesFilter

string

Some types of thresholds require querying reference samples and aggregating their values to calculate the comparison threshold. An expression specifies how to query these reference samples.

{ "bizdate": [ "-1", "-7", "-1m" ] }

Thresholds

object

The threshold settings.

Expected

object

The expected threshold setting.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Warned

object

The threshold settings for normal alerts.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

Critical

object

The threshold settings for critical alerts.

Value

string

The threshold value.

100.0

Operator

string

The comparison operator. Valid values:

  • >

  • >=

  • <

  • <=

  • !=

  • =

>

ErrorHandlers

array

The operations that you can perform after the rule-based check fails.

object

The operation that you can perform after the rule-based check fails.

Type

string

The type of the operation.

SaveErrorData

ErrorDataFilter

string

For a custom SQL rule, you must specify an SQL statement to filter problematic data.

SELECT * FROM tb_api_log WHERE id IS NULL

Sample

string

The sample values used for the check.

[ { "gender": "male", "_count": 100 }, { "gender": "female", "_count": 100 } ]

Details

array

The information about the data quality check.

object

The information about the data quality check.

ReferencedValue

string

The value that is calculated based on sample data. The value serves as a baseline value during the calculation of the value of the CheckedValue parameter.

0.0

CheckedValue

string

The value that is used for comparison with the threshold.

100.0

Status

string

The comparison result between the value specified by the CheckedValue parameter and the threshold.

Passed