- What data validation in ETL means
- Validation checks by ETL stage
- The six validation rule types
- Source-to-target reconciliation queries
- What to do when validation fails
- Common challenges and how to handle them
- Tools for ETL data validation
- How Integrate.io validates data in the pipeline
- Implementation checklist
- Frequently asked questions
Updated October 26, 2026.
Data validation in ETL is the set of checks that confirm data is complete, correctly typed, in range, unique and consistent with its source before, during and after it is extracted, transformed and loaded. Done well, it stops a dropped column, a duplicated batch or a silently truncated field from reaching the dashboards and systems that depend on the pipeline. This guide covers the checks that matter at each ETL stage, the SQL you can run to reconcile source and target, how to handle failures, which tools do what, and how Integrate.io builds validation into the pipeline itself.
Key takeaways
- Validate at three checkpoints, not one: after extraction (counts, schema, freshness), after transformation (business rules, types, keys) and after load (source-to-target reconciliation, constraints).
- Six rule types cover most needs: completeness, type and format, range, uniqueness, referential integrity and business logic.
- Row counts alone are not enough. Compare sums, min and max, null rates and distinct counts to catch problems a matching count hides.
- Decide the failure policy per rule: stop the job, quarantine the record, or warn and continue.
- Integrate.io validates in-pipeline with Assert and Filter components, real-time package validation in the designer, per-component record counts in Job Insights, and alerts to Slack, Teams, PagerDuty, email or webhooks.
Contents
- What data validation in ETL means
- Validation checks by ETL stage
- The six validation rule types
- Source-to-target reconciliation queries
- What to do when validation fails
- Common challenges and how to handle them
- Tools for ETL data validation
- How Integrate.io validates data in the pipeline
- Implementation checklist
- Frequently asked questions
What data validation in ETL means
Data validation is the quality gate inside an ETL workflow. It compares what the pipeline produced against what it should have produced, using rules you define in advance. Validation is narrower than data quality management, which also covers ownership, stewardship and remediation, and it is one part of ETL testing, which also exercises performance, regression and the pipeline code itself.
Three questions define the scope:
- Did everything arrive? Completeness: row counts, required fields, expected partitions and files.
- Is it the right shape? Conformity: data types, formats, lengths, encodings and schema.
- Is it true to the source and the business? Accuracy and consistency: transformation logic, totals, keys and rules such as "every order has a customer."
Validation that only runs at the end of the pipeline is the most common mistake. By the time a failed check appears after load, the bad batch may already be in the warehouse and the cost of unpicking it is far higher than catching it at extraction.
Validation checks by ETL stage
The table below is the minimum set of checks to run at each stage. Most are cheap: a count, a metadata read or a single aggregate query.
| Stage | What to check | Typical check | Catches |
|---|---|---|---|
| Extract | Source availability, row counts, schema, freshness | COUNT(*) against expected range; column list and types against a stored contract; MAX(updated_at) within SLA | Partial extracts, API pagination bugs, upstream schema drift, stale sources |
| Transform | Business rules, type conversions, joins, aggregates, derived fields | Null rate on required fields; range and format rules; join loss (rows in minus rows out); hand-computed totals on a sample | Wrong date parsing, dropped rows on inner joins, duplicated rows on fan-out joins, bad currency or unit conversions |
| Load | Source-to-target reconciliation, constraints, idempotency | Count, sum, min, max and distinct comparisons; duplicate key check; foreign key existence; reload produces the same result | Truncated loads, double loads, constraint violations, retries that insert twice |
Schema drift deserves its own line. A renamed or retyped source column breaks pipelines quietly, because the extract still succeeds. Store the expected schema and compare on every run. Integrate.io tracks this as a metric; see schema-drift incident count and the glossary entry on schema drift detection.
The six validation rule types
Almost every validation rule falls into one of six families. Define each rule with an owner, a severity and a failure action.
| Rule type | Question it answers | Example rule | Example SQL predicate |
|---|---|---|---|
| Completeness | Is required data present? | customer_id is never null; daily file has at least 10,000 rows | customer_id IS NULL |
| Type and format | Is the value the right type and pattern? | email matches an address pattern; order_date parses as a date | email NOT LIKE '%_@_%.__%' |
| Range | Is the value within bounds? | discount between 0 and 1; ship_date not before order_date | discount NOT BETWEEN 0 AND 1 |
| Uniqueness | Are keys unique? | one row per order_id per load | GROUP BY order_id HAVING COUNT(*) > 1 |
| Referential integrity | Do relationships hold? | every order.customer_id exists in customers | NOT EXISTS (SELECT 1 FROM customers c WHERE c.id = o.customer_id) |
| Business logic | Does the data obey domain rules? | state is required when country is US; refund amount never exceeds the original charge | country = 'US' AND state IS NULL |
Write each predicate so that it selects the bad rows. A validation query that returns zero rows passes. That convention makes rules easy to automate, count and quarantine.
Source-to-target reconciliation queries
Reconciliation confirms that what landed in the target matches what left the source after the intended transformations. Run these after every load and store the results so you can trend them.
1. Row count by partition. Compare per day or per batch rather than the whole table, so a small shortfall is visible.
SELECT load_date, COUNT(*) AS row_count
FROM source.orders
GROUP BY load_date
-- repeat against target.orders and diff the two result sets
2. Aggregate fingerprint. A matching count can still hide nulls, truncation or a bad conversion. Compare several aggregates at once.
SELECT 'source' AS side, COUNT(*) AS rows_,
SUM(amount) AS total, MIN(order_date) AS first_dt, MAX(order_date) AS last_dt,
COUNT(DISTINCT customer_id) AS customers,
SUM(CASE WHEN email IS NULL THEN 1 ELSE 0 END) AS null_emails
FROM source.orders WHERE load_date = CURRENT_DATE
UNION ALL
SELECT 'target', COUNT(*), SUM(amount), MIN(order_date), MAX(order_date),
COUNT(DISTINCT customer_id),
SUM(CASE WHEN email IS NULL THEN 1 ELSE 0 END)
FROM target.orders WHERE load_date = CURRENT_DATE;
3. Duplicate keys in the target.
SELECT order_id, COUNT(*)
FROM target.orders
GROUP BY order_id
HAVING COUNT(*) > 1;
4. Orphaned foreign keys.
SELECT o.order_id
FROM target.orders o
WHERE NOT EXISTS (SELECT 1 FROM target.customers c WHERE c.customer_id = o.customer_id);
5. Row-level diff on a sample. For a few hundred keys, join source and target and compare field by field. Hash the concatenated row on each side if the columns are wide.
SELECT s.order_id
FROM source.orders s
JOIN target.orders t ON t.order_id = s.order_id
WHERE MD5(CONCAT_WS('|', s.customer_id, s.amount, s.status))
<> MD5(CONCAT_WS('|', t.customer_id, t.amount, t.status));
Use tolerances where exact equality is unrealistic, for example floating-point totals or currency conversions, and set the tolerance per rule rather than globally.
What to do when validation fails
A validation rule without a failure policy is just a report. Decide, for every rule, which of three things happens when it trips.
| Policy | When to use it | What happens |
|---|---|---|
| Fail the job | Structural problems: missing required fields, schema mismatch, count outside tolerance, duplicate keys | The load stops before bad data reaches the target. The on-call person is paged. Downstream schedules do not run. |
| Quarantine the record | Row-level problems in otherwise good batches: a malformed email, an out-of-range value | Good rows load. Bad rows are written to a reject table or file with the rule name, timestamp and source row, then fixed at the source or reprocessed. |
| Warn and continue | Soft signals: null rate creeping up, a distribution shift, a late file | The job completes. A warning goes to the channel the data owner watches. Trends are reviewed weekly. |
Three details make this work in practice:
- Log the rule, not just the failure. Every rejected row should carry the rule name and the value that failed so the fix is obvious.
- Set thresholds on rates, not absolutes. "More than 0.5% of rows rejected" scales with volume; "more than 50 rows" does not.
- Make loads idempotent. If a job can be rerun safely (upsert by key, or truncate-and-reload a partition), recovery after a failed validation is a rerun rather than a cleanup.
Common challenges and how to handle them
- Volume. Row-by-row comparison of billions of rows is impractical. Reconcile with aggregates per partition, hash-compare a stratified sample, and run full row-level diffs only on the slice that changed.
- Schema evolution. Sources add and rename columns without warning. Store a schema contract, compare on every run, and alert on any change rather than only on breaking changes. See why schema-drift incidents matter.
- Nulls with meaning. A null can be "unknown," "not applicable" or "missing." Decide per field which it is and encode the rule accordingly; a blanket not-null check creates noise.
- Validation timing. Checks that run too early miss transformation bugs; checks that run too late force reprocessing. Use the three-checkpoint model above.
- Performance. Push validation to where the data already sits (the warehouse), run checks in parallel with the load where possible, and reserve full-table scans for off-peak windows.
- Sensitive data. Validation reads production data. Mask personal fields in reject tables and logs, restrict who can see failed rows, and audit access. Data security best practices cover the controls.
- Undocumented rules. When nobody can say what "valid" means, consumers lose trust. Keep a rule registry with the business justification, owner, severity and failure policy, and version it.
Tools for ETL data validation
Validation tooling falls into three groups. Many teams use one from each.
| Group | Examples | Best for | Trade-off |
|---|---|---|---|
| In-pipeline validation | Integrate.io (Assert, Filter, package validation, Job Insights, alerts); SSIS Data Profiling and Fuzzy Lookup; Informatica profiling and cleansing | Stopping bad data before it loads, with no separate testing stack | Rules live in the pipeline tool; warehouse-side tests still useful after load |
| Warehouse-side testing | dbt tests (unique, not_null, accepted_values, relationships); Great Expectations; Soda; Deequ | Testing transformed models and tables in SQL, versioned with code | Runs after load, so bad data is already in the warehouse when the test fails |
| Observability and ETL testing suites | Monte Carlo; Datafold; QuerySurge; Datagaps ETL Validator | Anomaly detection across many tables, regression diffs between pipeline versions, enterprise test management | Separate licence and setup; detection rather than prevention |
For a deeper comparison of the testing group, see ETL testing tools, and for the monitoring group, data pipeline monitoring tools. If your transformations run in dbt, ETLT with Snowflake, dbt and Integrate.io shows how in-pipeline validation and dbt tests fit together.
How Integrate.io validates data in the pipeline
Integrate.io is a low-code data pipeline platform with 150+ connectors and 220+ transformation steps. Validation is built into the package designer, so the checks run as part of the job rather than as a separate test suite. Here is how each piece maps to the practices above.
Assert: fail the job when a rule is broken
The Assert transformation checks every record against the conditions you define. Non-compliant records cause the job to fail with the error message you wrote, which lands in the job error log. Conditions combine with AND, OR or NOT and use the same operators as Filter: text equals, matches a regular expression, is empty, numeric comparisons, is null and is true. Use Assert for the "fail the job" policy: required keys, schema expectations, counts outside tolerance.
Filter and Clone: quarantine bad rows without stopping good ones
The Filter transformation includes or excludes records by condition. Pair it with Clone, which sends the same dataflow to up to ten branches: one branch filters to valid rows and loads them, another filters to invalid rows and writes them to a reject table or file with the rule name attached. That is the "quarantine the record" policy built from two components.
Select and the functions library: type, format and date validation
The Select transformation is where type and format rules live. The functions reference includes REGEX_EXTRACT for pattern checks, ToDateOrNull and ToDateCustomFormats for date parsing that returns null instead of failing on a bad value, ParseIntOrDefault and its long, float and double variants for safe numeric conversion, IsISODatetime, TRIM, UPPER and LOWER for normalization, COALESCE for null handling and MD5 or SHA256 for row fingerprints. Smart Transform generates expressions from an example or a plain-English description, and Live Preview runs the expression against sample rows from the previous component. Where you need SQL or Python, both are supported in the pipeline.
DB Lookup: referential integrity checks against reference data
The DB Lookup transformation enriches each record with columns from a database table or SQL query and lets you choose what happens when there is no match or multiple matches. Match each order against the customers table and route the no-match rows to the reject branch, and you have a referential integrity check inside the pipeline.
Real-time package validation and Component Previewer: catch design errors before a run
Since April 2026 the Package Designer validates continuously while you edit, separating warnings about unfinished settings from errors that would block a run. Package validation confirms that the dataflow ends at a destination, every component is connected, field syntax and expressions are correct and every variable is defined. The Component Previewer shows sample output at any transformation component before you run the full job, so a bad regex or date format is visible on 50 rows rather than 50 million.
Job Insights: record counts at every component
Job Insights reports records read, out and written for each component in a run, plus per-component runtime and a timeline. That gives you join-loss and filter-rate checks for free: compare the count going into a Join with the count coming out, and the count written at the destination with the count read at the source. Failed jobs expose detailed error messages and stack traces through View errors.
Alerts and hooks: route failures to the people who fix them
Alerts and Monitoring sends notifications to email, Slack, Microsoft Teams, PagerDuty or a webhook, with rules set at the package, workspace or account level for failed jobs, all jobs or specific run events. Service hooks fire on job submitted, started, completed and failed, on cluster errors and on skipped schedules, and each webhook is signed with an HMAC signature. For ELT and CDC pipelines, data observability metrics with user-set thresholds cover run times, row counts and schema changes.
Schema drift on ELT and CDC pipelines
On ELT and CDC pipelines, new source columns are added to the destination automatically, dropped columns are retained with nulls for new rows, and widening type changes can be applied automatically while narrowing changes are ignored to prevent data loss. The behavior is documented per source and destination, so the schema-evolution challenge above has a known answer rather than a surprise.
File ingestion with validation
Client and partner files are where most validation rules earn their keep. Integrate.io ingests CSV, Excel, XML, JSON and fixed-width files from SFTP, cloud storage or email, and the same Assert, Filter and Select components apply. Joining and validating two related client files before loading is a worked example, and the client data ingestion solution page covers the pattern.
Support, security and pricing
Integrate.io runs an annual SOC 2 audit, offers a HIPAA BAA, supports GDPR and CCPA, connects over SSH or PrivateLink and does not store your data; ephemeral processing data is deleted within 24 hours. Support is 24/7 with a two-minute first response and a 92% CSAT, and every account gets a 30-day onboarding with a Solution Engineer. Pricing is a flat $1,999 a month with unlimited data, pipelines and connectors, and there is a 14-day free trial with no credit card. Teams moving off SSIS, Informatica, Talend or Matillion can use the migration programs.
Implementation checklist
Before you build
- List the tables, files and APIs in scope and the consumers who depend on them.
- Profile each source: null rates, distinct counts, min and max, formats. The glossary entry on data profiling in ETL explains what to capture.
- Write the rules in the six-type format with owner, severity and failure policy.
Extract
- Row count within expected range per partition.
- Schema matches the stored contract; alert on any change.
- Freshness: latest record within SLA.
Transform
- Required fields not null after transformation.
- Types, formats and ranges pass on every row; bad rows routed to quarantine.
- Join loss and fan-out measured by comparing counts in and out.
- Totals on a sample match a hand calculation.
Load
- Count, sum, min, max, distinct and null-rate match between source and target.
- No duplicate keys; no orphaned foreign keys.
- Rerun produces the same result.
Operate
- Failures go to a channel someone owns; thresholds set on rates.
- Reject tables reviewed and fixed at the source.
- Rules versioned; results stored and trended.
Frequently asked questions
What are the steps in data validation within the ETL process?
Profile the sources, define rules with owners and failure policies, then check at three points: after extraction (counts, schema, freshness), after transformation (types, ranges, nulls, join loss, business rules) and after load (source-to-target reconciliation, uniqueness, referential integrity). Record every result, route failures to the right channel and fix problems at the source.
What is the difference between data validation and ETL testing?
Data validation checks the data on every run against predefined rules. ETL testing checks the pipeline itself: that transformations implement the specification, that a change does not alter previous results (regression), and that the job meets performance targets. Validation runs in production continuously; testing runs when the pipeline changes. See ETL testing fundamentals.
How do you validate data between source and target?
Compare counts per partition, then an aggregate fingerprint (sum, min, max, distinct count and null rate per key column), then duplicate keys and orphaned foreign keys in the target, and finally a hashed row-level diff on a sample. Set a tolerance per rule where exact equality is unrealistic, such as currency conversions.
Which SQL queries are used for ETL data validation?
The common patterns are a COUNT(*) comparison by partition, a UNION ALL of aggregates from source and target, a GROUP BY key HAVING COUNT(*) > 1 for duplicates, a NOT EXISTS subquery for referential integrity and an MD5 or SHA hash of concatenated columns for row-level diffs. Examples of each are in the reconciliation section above.
Should a failed validation stop the ETL job?
It depends on the rule. Structural failures such as a schema mismatch, a count far outside tolerance or duplicate keys should stop the job before the load. Row-level failures in an otherwise good batch should quarantine the bad rows and let the rest load. Soft signals such as a rising null rate should warn and continue. Integrate.io implements the first with Assert and the second with Filter plus Clone.
How does Integrate.io handle data validation?
Validation is built into the pipeline. Assert fails the job when a record breaks a rule, Filter and Clone route invalid rows to a reject branch, Select and the functions library handle type, format and date checks, DB Lookup checks keys against reference tables, real-time package validation and the Component Previewer catch design errors before a run, Job Insights reports record counts at every component, and alerts go to email, Slack, Microsoft Teams, PagerDuty or a webhook. Try it on a 14-day free trial.