Documentation Index
Fetch the complete documentation index at: https://openmetadata-feat-feat-2mbfixtestexui.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Test Definitions Reference
This page provides a complete reference for all data quality test definitions available in the OpenMetadata Python SDK. Tests are organized into two categories: Table-Level Tests and Column-Level Tests.Importing Test Definitions
All test definitions are available from themetadata.sdk.data_quality module:
Common Parameters
All test definitions support these optional parameters:| Parameter | Type | Description |
|---|---|---|
name | str | Unique identifier for the test case |
display_name | str | Human-readable name shown in UI |
description | str | Detailed description of what the test validates |
| Parameter | Type | Description |
|---|---|---|
column | str | Name of the column to test (required) |
Table-Level Tests
Table-level tests validate properties of entire tables, such as row counts, column counts, or custom SQL queries.TableRowCountToBeBetween
Validates that the number of rows in a table falls within a specified range. Parameters:min_count(int, optional): Minimum acceptable number of rowsmax_count(int, optional): Maximum acceptable number of rows
- Monitor data volume and detect data loss
- Validate expected data growth patterns
- Detect unexpected data surges
TableRowCountToEqual
Validates that the table has an exact number of rows. Parameters:row_count(int, required): Expected number of rows
- Validate fixed-size reference tables
- Ensure complete dimension table loads
- Verify static lookup tables
TableColumnCountToBeBetween
Validates that the number of columns in a table falls within a specified range. Parameters:min_count(int, optional): Minimum acceptable number of columnsmax_count(int, optional): Maximum acceptable number of columns
- Schema validation
- Detect unexpected column additions or removals
- Monitor schema evolution
TableColumnCountToEqual
Validates that the table has an exact number of columns. Parameters:column_count(int, required): Expected number of columns
- Strict schema validation
- Ensure schema stability
- Prevent schema drift
TableColumnNameToExist
Validates that a specific column exists in the table schema. Parameters:column_name(str, required): Name of the column that must exist
- Verify required columns are present
- Ensure critical columns aren’t dropped
- Validate schema migrations
TableColumnToMatchSet
Validates that table columns match an expected set of column names. Parameters:column_names(list[str], required): List of expected column namesordered(bool, optional): If True, column order must match exactly (default: False)
- Validate complete schema structure
- Ensure schema consistency across environments
- Detect unexpected schema changes
TableRowInsertedCountToBeBetween
Validates that the number of rows inserted within a time range is within bounds. Parameters:min_count(int, optional): Minimum acceptable number of inserted rowsmax_count(int, optional): Maximum acceptable number of inserted rowsrange_type(str, optional): Time unit (“HOUR”, “DAY”, “WEEK”, “MONTH”) (default: “DAY”)range_interval(int, optional): Number of time units to look back (default: 1)
- Monitor data ingestion rates
- Detect ingestion pipeline failures
- Validate ETL job completions
TableCustomSQLQuery
Validates data using a custom SQL query expression. Parameters:sql_expression(str, required): SQL query to executestrategy(str, optional): “ROWS” (count failing rows) or “COUNT” (expect a count) (default: “ROWS”)
- Implement custom business logic validation
- Validate referential integrity
- Check complex data relationships
TableDiff
Compares two tables and identifies differences in their data. Parameters:table2(str, required): Fully qualified name of the comparison tablekey_columns(list[str], optional): Columns to use as join keystable2_key_columns(list[str], optional): Join key columns from table 2use_columns(list[str], optional): Specific columns to compareextra_columns(list[str], optional): Additional columns to include in outputtable2_extra_columns(list[str], optional): Additional columns from table 2
- Validate data migrations
- Verify data replication
- Compare production vs staging data
For column-level tests (null checks, uniqueness, regex, ranges, and more), see Column-Level Test Definitions.