MDAA TS Docs
    Preparing search index...

    Structured rule object defining a single data quality validation check for Glue Catalog tables.

    Use cases: Rule definition, data validation, quality checks, structured rule configuration

    AWS: AWS Glue Data Quality rule definition in structured format, converted to DQDL

    Validation: ruleType is required; other fields depend on the specific rule type

    interface DataQualityRule {
        column?: string;
        comparisonOperator?: string;
        dataType?: string;
        duration?: string;
        ruleType: string;
        sql?: string;
        threshold?: number;
        value?: number;
        values?: (string | number)[];
        where?: string;
    }
    Index

    Properties

    column?: string

    Column name for column-specific rules.

    Use cases: Column targeting, field validation

    AWS: AWS Glue Catalog table column name

    Validation: Required for most rule types except RowCount and ColumnCount; must be a valid column name

    comparisonOperator?: string

    Comparison operator for threshold and value-based rules (e.g. =, >, <, >=, <=, in).

    Use cases: Threshold comparison, value validation, range checks

    AWS: Comparison operator for Glue Data Quality rules

    Validation: Must be one of: =, >, <, >=, <=, !=, <>, between, in; default varies by rule type

    dataType?: string

    Expected data type for ColumnDataType rule (e.g. STRING, INT, DATE, DECIMAL).

    Use cases: Schema validation, type checking, data type enforcement

    AWS: Expected column data type for Glue Data Quality validation

    Validation: Required for ColumnDataType rule; must be a valid Glue data type

    duration?: string

    Duration for DataFreshness rule specifying maximum data age (e.g. '24 hours', '7 days').

    Use cases: Data freshness validation, timeliness checks, recency requirements

    AWS: Duration threshold for Glue Data Quality DataFreshness rule

    Validation: Required for DataFreshness rule; format: ' '; defaults to '24 hours'

    ruleType: string

    Rule type identifier (e.g. IsComplete, ColumnValues, Uniqueness, RowCount, CustomSql).

    Use cases: Rule identification, validation type selection

    AWS: AWS Glue Data Quality rule type

    Validation: Must be one of: IsComplete, ColumnValues, IsUnique, IsPrimaryKey, ColumnExists, RowCount, ColumnCount, Completeness, Uniqueness, Mean, StandardDeviation, CustomSql, DataFreshness, ColumnDataType, ColumnLength

    sql?: string

    SQL query for CustomSql rule type, must return a single numeric value.

    Use cases: Custom validation logic, complex checks, SQL-based rules

    AWS: Custom SQL query for Glue Data Quality CustomSql rule

    Validation: Required for CustomSql rule; must be a SELECT returning a single numeric value

    threshold?: number

    Threshold value (0.0–1.0) for percentage-based rules like Completeness and Uniqueness.

    Use cases: Completeness validation, uniqueness checks

    AWS: Threshold for Glue Data Quality percentage-based rules

    Validation: Must be between 0.0 and 1.0; defaults to 0.95

    value?: number

    Numeric value for count and statistical rules (e.g. RowCount, Mean, StandardDeviation).

    Use cases: Row count validation, statistical thresholds, numeric comparisons

    AWS: Numeric value for Glue Data Quality rule comparisons

    Validation: Must be numeric; required for RowCount, ColumnCount, Mean, StandardDeviation, ColumnLength rules

    values?: (string | number)[]

    Allowed values list for ColumnValues rule with 'in' operator.

    Use cases: Enum validation, allowed value lists, categorical data validation

    AWS: Allowed values for Glue Data Quality ColumnValues rule

    Validation: Required for ColumnValues rule; can contain strings or numbers

    where?: string

    SQL WHERE clause to filter rows before applying the rule.

    Use cases: Conditional validation, row filtering, subset checks

    AWS: WHERE clause for Glue Data Quality rule filtering

    Validation: Must be a valid SQL WHERE condition; use single quotes for string literals