Limitations

Updated at:

This topic describes the limitations of using Data Quality APIs and configuring Specs.

DataQualityScan Spec limitations

Datasets

  • You can configure at most one Datasets entry.

  • Only one table is supported in tables. Wildcards are not currently supported.

  • Configure filter to specify the data range by using a WHERE condition.

    Note

    A filter is required for a MaxCompute partitioned table. Otherwise, execution fails.

datasets:
  - type: Table
    tables:
      - ods_d_dq_openapi_log  # At most one table; wildcards are not supported
    dataSource:
      name: odps_first
      envType: Dev
    filter: "dt = '$[yyyymmdd-1]'"  # Currently, only a data range specified by a WHERE condition is supported
rules:
  # ...

Rules

Thresholds for fluctuation rules support only the following formats:

Rule threshold requirements

Format

To alert on an increase, the fail threshold must be greater than the warn threshold, and both must be greater than 0.

  • warn: when > 0.1%

  • fail: when > 0.5%

To alert on a decrease, the fail threshold must be less than the warn threshold, and both must be less than 0.

  • warn: when < -0.1%

  • fail: when < -0.5%

To alert on both increases and decreases, use not between. The lower and upper bounds must be opposites, and the absolute values of the fail bounds must be greater than those of the warn bounds. None of the bounds can be 0.

  • warn: when not between -0.1% and 0.1%

  • fail: when not between -0.5% and 0.5%

DataQualityTemplate Spec limitations

Only certain fixed combinations of the assertion parameter are supported in rule templates.

Rule

Example assertion parameter configuration

Compare with a fixed value

assertion: "row_count > 0"

Fluctuation from the seven-day average

assertion: "change avg last 7 days percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Fluctuation from the 30-day average

assertion: "change avg last 1 month percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Day-over-day fluctuation

assertion: "change 1 day ago percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Seven-day periodic fluctuation

assertion: "change 7 day ago percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

30-day periodic fluctuation

assertion: "change 1 month ago percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Fluctuation in the seven-day variance

assertion: "change var last 7 days percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Fluctuation in the 30-day variance

assertion: "change var last 1 month percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Fluctuation detection over 1, 7, and 30 days

assertion: "change 1 day ago and 7 days ago and 1 month ago percent for avg(size)"
warn: "when > 0.1%"
fail: "when > 0.5%"

Intelligent dynamic threshold

assertion: "anomaly detection for avg(size)"

DataQualityAlertRule limitations

  • A DataQualityAlertRule can monitor only one DataQualityScan.

  • AlertRules that monitor the same DataQualityScan must have the same Condition.

  • Condition supports only one expression format. Combine the results object's status property with the resultscorresponding rule object's severity property. These two properties must appear as a pair.

    results.any { r -> 
        r.status == 'Fail' && r.rule.severity == 'Normal' || 
            r.status == 'Error' && r.rule.severity == 'High' || 
            r.status == 'Warn' && r.rule.severity == 'High' 
    }