Skip to main content

Column-Level Test Definitions

Column-level tests validate properties of specific columns. For table-level tests and importing instructions, see the Test Definitions Reference.

Column-Level Tests

ColumnValuesToBeNotNull

Validates that a column contains no null or missing values. Parameters:
  • column (str, required): Name of the column to validate
Example:
Use Cases:
  • Ensure required fields are populated
  • Validate data completeness
  • Enforce NOT NULL constraints

ColumnValuesToBeUnique

Validates that all values in a column are unique with no duplicates. Parameters:
  • column (str, required): Name of the column to validate
Example:
Use Cases:
  • Validate primary keys
  • Ensure unique identifiers
  • Detect duplicate records

ColumnValuesToBeInSet

Validates that all values in a column belong to a specified set. Parameters:
  • column (str, required): Name of the column to validate
  • allowed_values (list[str], required): List of acceptable values
Example:
Use Cases:
  • Validate enum values
  • Enforce categorical constraints
  • Validate lookup values

ColumnValuesToBeNotInSet

Validates that column values do not contain any forbidden values. Parameters:
  • column (str, required): Name of the column to validate
  • forbidden_values (list[str], required): List of values that must not appear
Example:
Use Cases:
  • Detect test data in production
  • Blacklist invalid values
  • Filter out placeholder values

ColumnValuesToMatchRegex

Validates that column values match a specified regular expression pattern. Parameters:
  • column (str, required): Name of the column to validate
  • regex (str, required): Regular expression pattern
Example:
Use Cases:
  • Validate data format consistency
  • Ensure pattern compliance
  • Detect malformed data

ColumnValuesToNotMatchRegex

Validates that column values do not match a forbidden regular expression pattern. Parameters:
  • column (str, required): Name of the column to validate
  • regex (str, required): Regular expression pattern that values must NOT match
Example:
Use Cases:
  • Detect test data patterns
  • Prevent specific formats
  • Identify security risks

ColumnValuesToBeBetween

Validates that all values in a column fall within a specified numeric range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable value
  • max_value (float, optional): Maximum acceptable value
Example:
Use Cases:
  • Validate numeric constraints
  • Detect outliers
  • Ensure value ranges

ColumnValueMaxToBeBetween

Validates that the maximum value in a column falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable maximum value
  • max_value (float, optional): Maximum acceptable maximum value
Example:
Use Cases:
  • Monitor data ranges
  • Detect upper outliers
  • Validate maximum constraints

ColumnValueMinToBeBetween

Validates that the minimum value in a column falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable minimum value
  • max_value (float, optional): Maximum acceptable minimum value
Example:
Use Cases:
  • Monitor lower bounds
  • Detect lower outliers
  • Validate minimum constraints

ColumnValueMeanToBeBetween

Validates that the mean (average) value falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable mean value
  • max_value (float, optional): Maximum acceptable mean value
Example:
Use Cases:
  • Statistical validation
  • Detect data drift
  • Monitor averages

ColumnValueMedianToBeBetween

Validates that the median value falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable median value
  • max_value (float, optional): Maximum acceptable median value
Example:
Use Cases:
  • Robust central tendency checks
  • Detect skewed distributions
  • Monitor typical values

ColumnValueStdDevToBeBetween

Validates that the standard deviation falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable standard deviation
  • max_value (float, optional): Maximum acceptable standard deviation
Example:
Use Cases:
  • Detect unexpected variability
  • Monitor data consistency
  • Validate distribution stability

ColumnValuesSumToBeBetween

Validates that the sum of all values falls within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_value (float, optional): Minimum acceptable sum
  • max_value (float, optional): Maximum acceptable sum
Example:
Use Cases:
  • Validate totals
  • Monitor aggregates
  • Detect unexpected volumes

ColumnValuesMissingCount

Validates the count of missing or null values. Parameters:
  • column (str, required): Name of the column to validate
  • missing_count_value (int, optional): Expected number of missing values
  • missing_value_match (list[str], optional): Additional strings to treat as missing
Example:
Use Cases:
  • Monitor data completeness
  • Track missing data patterns
  • Validate optional fields

ColumnValueLengthsToBeBetween

Validates that string lengths fall within a specified range. Parameters:
  • column (str, required): Name of the column to validate
  • min_length (int, optional): Minimum acceptable string length
  • max_length (int, optional): Maximum acceptable string length
Example:
Use Cases:
  • Validate string constraints
  • Prevent truncation
  • Ensure format compliance

ColumnValuesToBeAtExpectedLocation

Validates that latitude and longitude values are within a configured radius of an expected location from a reference column, such as a city or postal code. Parameters:
  • column (str, required): Reference location column, such as a city or postal code column
  • location_reference_type (str, required): Type of location reference. Supported values are CITY and POSTAL_CODE
  • longitude_column_name (str, required): Name of the longitude column in the table
  • latitude_column_name (str, required): Name of the latitude column in the table
  • radius (float, required): Allowed distance from the expected location in meters
Example:
Use Cases:
  • Validate latitude and longitude coordinates against a city or postal code column
  • Detect records with coordinates outside an expected delivery or service area
  • Check geospatial data quality before downstream mapping or distance calculations

Customizing Tests

All tests support customization through fluent methods:
Or pass values directly to the constructor:

Next Steps