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 Type | Description | Example |
|---|
TABLE | Validates table-level properties | Row count between X and Y |
COLUMN | Validates column-level properties | Column values match regex |
Fully Qualified Name
The FQN for a test definition is simply its name:
columnValueLengthsToBeBetween
API Endpoints
| Method | Endpoint | Description |
|---|
POST | /v1/dataQuality/testDefinitions | Create a custom test definition |
GET | /v1/dataQuality/testDefinitions | List test definitions |
GET | /v1/dataQuality/testDefinitions/{id} | Get by ID |
GET | /v1/dataQuality/testDefinitions/name/{name} | Get by name |