Skip to main content

Test Definitions

A Test Definition describes a reusable data quality validation rule. It defines what to check, what parameters it accepts, and which data types it supports.
OpenMetadata ships with 25+ built-in test definitions. You can also create custom test definitions for organization-specific validations.

Built-in vs Custom

  • Built-in test definitions are provided by the system (provider: "system") and cover common checks like null counts, value ranges, and uniqueness.
  • Custom test definitions are created via the API for organization-specific validation logic.

Entity Type

Each test definition targets either a table or a column:
Entity TypeDescriptionExample
TABLEValidates table-level propertiesRow count between X and Y
COLUMNValidates column-level propertiesColumn values match regex

Fully Qualified Name

The FQN for a test definition is simply its name:
columnValueLengthsToBeBetween

API Endpoints

MethodEndpointDescription
POST/v1/dataQuality/testDefinitionsCreate a custom test definition
GET/v1/dataQuality/testDefinitionsList test definitions
GET/v1/dataQuality/testDefinitions/{id}Get by ID
GET/v1/dataQuality/testDefinitions/name/{name}Get by name