What ETL testing is: the load, the mapping document and the kinds of checks
ETL & Data Warehouse Testing · 7 questions
Short notes
Key idea
ETL copies data from a source to a target: extract, transform by rules, load. ETL testing proves the target holds exactly the source's data, transformed exactly as the source-to-target mapping (STM) document says. Every mapping row is at least one test case.
Syntax
-- Read the requirements
SELECT target_column, source_column, rule, nullable
FROM stm WHERE target_table = 'dw_orders';
-- Same measure on both sides, then compare
SELECT (SELECT COUNT(*) FROM orders) AS source_rows,
(SELECT COUNT(*) FROM dw_orders) AS target_rows;
Generated columns (keys, load ids) have no source: test them by their own rules (unique, not NULL, point to real rows). Read the load log for failed runs, read = written + rejected, and window coverage, but don't trust it as proof.
Example
The shop's orders and dw_orders both have 80 rows, but dw_orders has only 78 distinct order ids: two orders are duplicated and two are missing.
Traps
- Matching row counts don't prove a correct load.
- Testing without the mapping document.
- Trusting the job's own load log.
- Forgetting generated columns.
Want the full lesson with step-by-step examples, a project and a certificate? ETL & Data Warehouse Testing course, ₹120 →
- Question 1easy
In ETL, what does the T step do?
- Question 2easy
In the shop's warehouse load, which pair is source → target?
- Question 3medium
How many target columns in
stmare generated by the load (no source column)?SELECT COUNT(*) FROM stm WHERE source_column IS NULL;
- Question 4easy
How many load runs failed?
SELECT COUNT(*) FROM dw_load_log WHERE status = 'failed';
- Question 5medium
Totals differ between source and target. Which check tells you which orders are wrong?
What ETL testing is: the load, the mapping document and the kinds of checks
What ETL testing is: the load, the mapping document and the kinds of checks
What ETL testing is: the load, the mapping document and the kinds of checks
What ETL testing is: the load, the mapping document and the kinds of checks
What ETL testing is: the load, the mapping document and the kinds of checks
2 more questions on this topic, with hints, and tests
Sign up free for 21 days of every question and test.