Data validation is the set of checks that confirm data is the right type, format, range and structure, is complete and consistent, and still matches its source, before anyone uses it. The main methods are type, format, range and constraint checks; consistency and cross-field rules; uniqueness and referential integrity; completeness and freshness checks; reconciliation between source and target; and statistical checks on distributions. A validation strategy decides which of these run where in the pipeline, what happens when a check fails, and who owns the fix.
This guide is about that strategy: placing the right checks at each stage and choosing the action on failure. For the problems validation is meant to catch, such as duplicates, stale records and inconsistent definitions, and how to fix them at the source, see our guide to common data quality issues and how to fix them. For how to measure the result over time, see data quality metrics.
Each method answers a different question about a record or a dataset. Most enterprises need all of them, but not at every stage.
| Method | What it checks | Example | Typical place it runs |
|---|---|---|---|
| Data type | Value matches the expected type | A quantity field accepts only integers | Forms, APIs, database schema |
| Format | Value follows a pattern | Email address, ISO 8601 date, postcode | Forms, APIs, ingestion |
| Range and constraint | Value falls within allowed limits or meets a rule | Price greater than zero; age between set bounds | Database CHECK constraints, transformation tests |
| Accepted values | Value is one of a known list | Order status is placed, shipped, completed or returned | Transformation tests |
| Consistency (cross-field) | Fields agree with each other | Delivery date is later than shipping date | Application logic, transformation tests |
| Uniqueness | No duplicate keys | One row per customer ID or invoice number | Database unique constraints, transformation tests |
| Referential integrity | A key points to a real parent record | Every order's customer ID exists in the customer table | Database foreign keys, transformation tests |
| Completeness | Required values and records are present | No null customer IDs; expected row count arrived | Ingestion, transformation tests |
| Freshness | Data is current enough for its use | Sales table updated within the last hour | Scheduled monitoring |
| Reconciliation | Target still matches source | Row counts, column sums or row hashes agree after a migration | Migration and replication jobs |
| Statistical or distribution | Values behave as expected over time | Daily order volume within normal bounds; no sudden shift in a feature used by a model | Monitoring, pre-training checks |
At the point of entry these checks are familiar. In an online application form, the system checks the email format, the age range and that required fields are filled before the form can be submitted:
A common mistake is to validate only at one point, usually in a report after the damage is done. A layered strategy catches each class of error at the cheapest place to fix it.
| Stage | What to validate | Typical mechanism | Action on failure |
|---|---|---|---|
| Point of entry (forms, apps, APIs) | Type, format, required fields, simple ranges | Field validation in the application or API schema | Reject and ask the user or calling system to correct |
| Database | Not null, unique, primary and foreign keys, check rules | Database constraints | Reject the write |
| Ingestion | Schema, expected columns, row counts, file completeness | Pipeline checks on landing data | Quarantine the batch and alert the owner |
| Transformation | Uniqueness, accepted values, relationships, business rules | Data tests in the transformation layer | Warn, drop bad rows or stop the run, by severity |
| Migration and replication | Source and target agree | Column aggregates, row counts, row hashes, schema comparison | Block cut-over until differences are explained |
| Before AI and analytics use | Completeness, representativeness, freshness, distribution shifts | Profiling and statistical checks | Hold the training run or flag the dashboard |
| Consumption | Freshness and agreed thresholds on published datasets | Monitoring and alerting | Show a warning to consumers and open an incident |
The database layer is often underused. PostgreSQL, for example, supports check, not-null, unique, primary key, foreign key and exclusion constraints, and its documentation describes a check constraint as "the most generic constraint type", allowing you to specify that a column value "must satisfy a Boolean (truth-value) expression". A rule enforced in the database cannot be bypassed by a new application that forgets it. For master records shared across systems, pair validation with master data management so there is one authoritative version to check against.
To automate these checks at scale, see XenonStack's augmented data quality approach.
The tools below are listed by the stage they serve. Status and licence details come from each vendor's or project's own pages, read on 11 November 2026.
| Tool | Best fit | Current status |
|---|---|---|
| Database constraints (PostgreSQL example) | Rules that must never be broken, enforced on every write | Built into the database; PostgreSQL 18 is the current documented release |
| dbt data tests | SQL-based tests in the transformation layer | Four built-in generic tests: unique, not_null, accepted_values and relationships; the tests: key was renamed data_tests: and remains supported as an alias |
| GX Core (Great Expectations) | Python-based expectations, validation and documentation | Open source framework under the Apache 2.0 licence; a hosted GX Cloud product is also offered |
| Databricks pipeline expectations | Validation inside Databricks Lakeflow pipelines | SQL Boolean constraints with three actions: warn (retain), drop or fail |
| Google Data Validation Tool (DVT) | Source-to-target reconciliation during migrations | Open source Python CLI under Apache-2.0, supporting 16 sources including BigQuery, Oracle, Snowflake, Teradata and PostgreSQL; the project states it is not an officially supported Google product |
| Informatica | Enterprise data quality and data management suites | Salesforce announced on 18 November 2025 that it had completed its acquisition of Informatica |
| Talend (Qlik) | Data integration with quality rules | The open source Talend Open Studio was retired effective 31 January 2024 and is no longer hosted or updated by Qlik and Talend |
Two tools from the earlier version of this post need care. The free Talend Open Studio is no longer maintained, so any pipeline that still depends on it should be planned for replacement. Google's DVT remains useful for migration checks, but its own repository warns that it is not an officially supported Google product and that backwards-incompatible changes may occur, so pin a version and test upgrades.
Validation lives in code. dbt describes data tests as SQL select statements that return failing records, so a test passes when it returns zero rows. Tests sit in version control next to the transformations they protect.
Terminology has shifted. dbt renamed tests to data tests to distinguish them from unit tests, and newer versions expect test inputs under an arguments: key.
Pipelines decide what happens to bad rows. Databricks pipeline expectations let you keep invalid records with a warning, drop them, or fail the update, with metrics tracked for warn and drop.
The vendor landscape has consolidated. Salesforce completed its acquisition of Informatica in November 2025, and Talend Open Studio was retired in January 2024.
AI raises the bar. Article 10 of the EU AI Act requires training, validation and testing data for high-risk AI systems to be "relevant, sufficiently representative, and to the best extent possible, free of errors and complete", and lists cleaning, labelling and enrichment among the data preparation practices that governance must cover.
Start from the decisions and datasets that matter. List the reports, models and processes where bad data would cost money, breach a rule or mislead a decision.
Write rules as code. Express each rule as a constraint, data test or expectation in version control, with a named owner and a short business reason.
Place each rule at the cheapest stage. Use the stage table above: entry and database for hard rules, transformation for business rules, reconciliation for migrations.
Set severity for every check. Decide in advance whether a failure warns, drops the row or stops the run.
Profile before you set thresholds. Look at real distributions, null rates and value ranges before choosing limits, then review them as the data changes.
Quarantine, do not discard. Store failing records so owners can inspect and correct them at source.
Monitor and report. Track pass rates and freshness over time and publish them next to the datasets they describe, using the data quality management practices your governance team already runs.
Review after every incident. When bad data gets through, add the missing check and record why it was missed.
| Failure action | When it fits | Risk if misused |
|---|---|---|
| Warn and keep the record | Soft rules where some invalid data is acceptable and you want visibility | Warnings that nobody reads become noise |
| Drop or quarantine the record | Row-level errors that should not reach consumers, with a store of failures for review | Silently losing data; always count and keep dropped rows |
| Fail the run | Hard rules where any violation makes the output untrustworthy, such as duplicate primary keys | Blocking downstream jobs for a minor issue; reserve for critical rules |
dbt supports the same choices with warn and error severity, custom error_if and warn_if thresholds, and a store_failures option that writes failing records to an audit table. Records that fail validation are exceptions that need a person with context. The Exception Handling Agent routes every edge case to the right person with full context and evidence for faster resolution.
Who owns each rule? Every check needs a business owner who can say whether a failure matters and a technical owner who can fix it.
Can we prove what was checked? Auditors and risk teams may ask for evidence that data was validated before a decision or model used it. Keep test results and failure stores, not just pass or fail flags. Audit Agent assembles decision lineage, policy versions, approvals and authority chains for compliance teams.
Where do failing records go? Quarantine tables often hold sensitive data; apply the same access controls as the source.
What does validation cost to run? Every check is a query. Validate incrementally where possible, sample very large tables for statistical checks, and reserve full row-hash reconciliation for migrations and critical tables.
Are rules versioned with the data definitions they enforce? When a definition changes, the rule should change in the same release. ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents, which helps when agents rely on validated data to act.
| Choice | Strength | Trade-off or when not to use it |
|---|---|---|
| Validating everything everywhere | Maximum coverage | Slow pipelines, high compute cost and alert fatigue; focus on data that drives decisions |
| Failing the run on any error | Nothing bad gets through | A single minor issue can stop critical reporting; use severity levels |
| Strict entry validation | Clean data from the start | Over-strict forms push users to enter placeholder values that pass checks but are wrong |
| Fixing data in the pipeline | Quick results for consumers | Hides the root cause; fix at source where possible |
| Statistical anomaly checks | Catch problems no rule anticipated | Need tuning; seasonal patterns can trigger false alarms |
| Full row-hash reconciliation | Strongest proof that source and target match | Expensive on very large tables; use for migrations and critical datasets |
For continuous monitoring once checks are in place, see our guide to the pillars of data observability.
To map one data-driven decision your agents should make, and the validated context and policy it depends on, book a Context Workshop. See what happens in the workshop.
The main types are data type, format, range and constraint, accepted values, consistency or cross-field, uniqueness, referential integrity, completeness, freshness, source-to-target reconciliation and statistical or distribution checks.
A data validation strategy decides which checks run at which stage of the pipeline, from entry and database through ingestion, transformation and migration to AI and analytics use, what happens when a check fails, and who owns each rule and its fix.
Data validation is the set of checks applied to data. Data quality is the broader outcome, covering accuracy, completeness, consistency and timeliness, and includes fixing root causes, ownership and monitoring. Validation is one of the main tools for achieving data quality.
Common options are database constraints, dbt data tests in the transformation layer, GX Core (Great Expectations) for Python-based expectations, Databricks pipeline expectations, and Google's open source Data Validation Tool for migration reconciliation. Informatica and Qlik's Talend products cover broader enterprise data quality needs.
Decide in advance by severity: warn and keep the record for soft rules, drop or quarantine the record for row-level errors, or fail the run for critical rules. Keep failing records so owners can correct them at source.
No. Qlik states that the open source Talend Open Studio was retired effective 31 January 2024 and is no longer hosted or updated by Qlik and Talend.