ETL testing interview questions and answers
ETL testing interview questions check whether you can prove that data moved from source to target completely and correctly: every expected row arrived, every transformation rule was applied, history was kept the way the design says, and bad records were caught instead of loaded. Most of the interview is SQL: count and key reconciliation, column comparisons after applying the mapping, duplicate and null checks, slowly changing dimension checks and incremental load scenarios.
By Evin JohnPublished 11 min read
What ETL testers do and how they are interviewed
An ETL tester validates the pipelines that extract data from source systems, transform it and load it into a warehouse, lake or reporting database. The work is driven by the source-to-target mapping document, which says where each target column comes from and which rule changes it. Teams hire for strong SQL, an eye for data edge cases, and enough data warehouse knowledge to understand facts, dimensions and history. Tool names in job posts vary (Informatica, SSIS, Talend, Azure Data Factory, dbt, cloud warehouses), but the interview usually centers on SQL you write live and on how you would test a given load.
Expect a screening call about your projects, a SQL round with joins, set operations, aggregation and window functions, a concepts round on warehousing and ETL testing types, and a scenario round: "counts match but the report total is wrong", or "how would you test this incremental load?" Experienced candidates are asked how they automate checks and handle tables too large to compare row by row.
Fundamentals for freshers
| Question | What it tests | What a strong answer shows |
|---|---|---|
| ETL versus ELT? | Architecture | ETL transforms data before loading it into the target. ELT loads raw data first and transforms it inside the warehouse, which is common with cloud warehouses. Testing covers the same rules in a different place. |
| ETL testing versus database testing? | Scope | Database testing checks one application's database: schema, constraints, procedures. ETL testing checks data moving between systems: completeness, transformations, history and reconciliation. |
| What is a source-to-target mapping document? | Artifacts | The specification for each target column: source table and column, transformation rule, defaults, lookups and how rejects are handled. It is the basis for every test case. |
| Fact table versus dimension table? | Modeling | Facts hold measurable events (sales, payments) with foreign keys to dimensions. Dimensions hold descriptive context (customer, product, date) used to filter and group. |
| Star schema versus snowflake schema? | Modeling | A star has denormalized dimensions joined directly to the fact. A snowflake normalizes dimensions into further tables, saving space at the cost of more joins. |
| Natural key versus surrogate key? | Keys | The natural (business) key comes from the source, such as a customer number. The surrogate key is a warehouse-generated ID, needed when one business key has several historical rows. |
| What is a staging area? | Architecture | An intermediate area where raw extracts land before transformation, useful for reprocessing and for testing extraction separately from transformation. |
| What types of ETL testing are there? | Coverage | Metadata and schema checks, completeness, transformation accuracy, data quality, duplicate checks, incremental load tests, history (SCD) tests, performance of the load, regression, and validation of reports built on the data. |
| OLTP versus OLAP? | Systems | OLTP systems handle many small transactions with normalized tables. OLAP systems serve analysis over large volumes, usually with dimensional models. ETL often moves data from the first to the second. |
Source-to-target validation
- Why are matching row counts not enough? The same count can hide a missing row plus a duplicate, or correct keys with wrong values. Counts are a first signal; key comparison and column checks prove completeness and accuracy.
- How do you find records missing in the target? Select business keys from the source and subtract those in the target with
EXCEPT(MINUSin Oracle), or use aLEFT JOINwhere the target key is null. Run it both ways to find extra target rows too. - How do you validate a transformation? Write the rule as SQL on the source (trim, case, lookup, unit conversion, derived column), join to the target on the business key, and select rows where any column differs.
- How do you compare columns that can be null?
a = bis not true when both are null. UseIS DISTINCT FROMwhere the database supports it,<=>in MySQL, or wrap both sides withCOALESCEto a sentinel. - What do you check about data types and formats? Truncation of long strings, decimal precision and rounding, date and time zone conversions, character encoding (accents and non-Latin names), and leading zeros lost when a code becomes a number.
- How do you handle rejected records? Check that rows failing rules land in a reject or error table with a reason, that they are not silently dropped, and that source count equals loaded plus rejected.
- What is aggregate reconciliation? Comparing totals such as sum of amounts, count per day or count per status between source and target. It is cheap, catches large problems fast and is what business users check first.
-- Staging copy of the source, the target dimension, and a lookup used by the mapping.
CREATE TABLE src_customer (customer_id INTEGER, name TEXT, country TEXT, balance_cents INTEGER, updated_at TEXT);
CREATE TABLE country_map (country TEXT, country_code TEXT);
CREATE TABLE dim_customer (
customer_sk INTEGER PRIMARY KEY, customer_id INTEGER, name TEXT, country_code TEXT,
balance NUMERIC, valid_from TEXT, valid_to TEXT, is_current INTEGER
);
INSERT INTO country_map VALUES ('Germany', 'DE'), ('India', 'IN'), ('United States', 'US');
INSERT INTO src_customer VALUES
(1, ' Ana Ruiz ', 'Germany', 125050, '2026-11-30'),
(2, 'Ben Okafor', 'India', 0, '2026-11-30'),
(3, 'Chen Li', 'United States', 990, '2026-12-01'),
(4, 'Dara Singh', 'India', 4500, '2026-12-01');
INSERT INTO dim_customer VALUES
(1, 1, 'Ana Ruiz', 'DE', 1250.50, '2026-01-01', '9999-12-31', 1),
(2, 2, 'Ben Okafor', 'IN', 0, '2026-01-01', '2026-11-30', 0),
(3, 2, 'Ben Okafor', 'IN', 0, '2026-11-30', '9999-12-31', 1),
(4, 3, 'Chen Li', 'US', 99.00, '2026-02-01', '9999-12-31', 1),
(5, 3, 'Chen Li', 'US', 9.90, '2026-06-01', '9999-12-31', 1);-- 1. Counts: source rows versus current target rows.
SELECT (SELECT COUNT(*) FROM src_customer) AS source_rows,
(SELECT COUNT(*) FROM dim_customer WHERE is_current = 1) AS target_current_rows;
-- 2. Completeness: business keys in the source that never arrived (Oracle spells EXCEPT as MINUS).
SELECT customer_id FROM src_customer
EXCEPT
SELECT customer_id FROM dim_customer WHERE is_current = 1;
-- 3. Accuracy: apply the mapping rules to the source and compare column by column.
SELECT s.customer_id, d.customer_sk,
ROUND(s.balance_cents / 100.0, 2) AS expected_balance, d.balance AS actual_balance
FROM src_customer s
JOIN country_map m ON m.country = s.country
JOIN dim_customer d ON d.customer_id = s.customer_id AND d.is_current = 1
WHERE d.name IS DISTINCT FROM TRIM(s.name)
OR d.country_code IS DISTINCT FROM m.country_code
OR ROUND(d.balance, 2) IS DISTINCT FROM ROUND(s.balance_cents / 100.0, 2);
-- 4. SCD Type 2: exactly one current row per business key.
SELECT customer_id, COUNT(*) AS current_rows
FROM dim_customer WHERE is_current = 1
GROUP BY customer_id HAVING COUNT(*) <> 1;
-- 5. SCD Type 2: validity periods for the same key must not overlap.
SELECT a.customer_id, a.customer_sk AS row_a, b.customer_sk AS row_b
FROM dim_customer a
JOIN dim_customer b
ON a.customer_id = b.customer_id AND a.customer_sk < b.customer_sk
AND a.valid_from < b.valid_to AND b.valid_from < a.valid_to;
-- 6. Aggregate reconciliation: totals must match after conversion.
SELECT (SELECT SUM(balance_cents) / 100.0 FROM src_customer) AS source_total,
(SELECT ROUND(SUM(balance), 2) FROM dim_customer WHERE is_current = 1) AS target_total;Slowly changing dimensions
- What are the common SCD types? Type 0 keeps the original value forever. Type 1 overwrites, so no history. Type 2 adds a new row per change with validity dates or a current flag. Type 3 keeps the previous value in an extra column. Hybrids such as Type 6 combine them.
- How do you test a Type 2 dimension after a change? The old row is closed with the right end date and current flag off, a new row exists with a new surrogate key, the new start date lines up with the old end date, and attributes that did not change are carried over.
- Which invariants do you check on every load? One current row per business key, no overlapping periods, no gaps between consecutive periods if the design forbids them, and current rows ending at the agreed open date (often 9999-12-31).
- What if a change happens in an attribute that is not tracked? Depending on the design it is overwritten in place (Type 1 behavior for that column) and must not create a new history row. Test both tracked and untracked columns.
- What happens to facts when a dimension changes? New facts should point to the new surrogate key; old facts keep pointing to the version that was current when they happened. A join on the business key instead of the surrogate key double counts.
- What is a late-arriving dimension? A fact arrives before its dimension row exists. Check how the load handles it, commonly with an "unknown" placeholder row that is updated later, and that facts are re-pointed correctly.
Incremental loads
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Full load versus incremental load? | Load strategy | A full load reloads everything; simple but slow on large data. An incremental load picks up only new and changed records since the last run, using a watermark column or change data capture. |
| How do you test that the watermark works? | Incremental logic | Insert and update source rows just before and after the last watermark, run the load, and check that exactly the right rows were picked up and that the stored watermark moved forward. |
| How are deletes handled, and how do you test them? | Deletes | Either physical deletes in the source are captured (CDC or a full key comparison) and applied as soft deletes in the target, or they are not handled at all. Delete a source row and see what the target does. |
| What happens if the same batch runs twice? | Idempotency | A rerun must not create duplicates or double totals. Run the same load twice and compare counts, keys and aggregates. |
| The load fails halfway. What should you verify? | Recovery | That the restart resumes or rolls back cleanly, partial data is not left in the target, and the watermark did not advance past data that never loaded. |
| How do you test late data? | Timeliness | Send a record with an old business date but a new load time, and check that it lands in the right period and that dependent aggregates are recalculated if the design says so. |
| What timing edge cases do you test? | Time zones | Records changed exactly at the watermark, around midnight in different time zones, and on daylight saving changes, where a fixed time window can skip or repeat an hour. |
Data quality rules and senior scenarios
- Which data quality dimensions do you check? Completeness (mandatory fields filled), uniqueness (no duplicate keys), validity (values in an allowed domain or format), consistency (referential integrity and cross-field rules), accuracy against a trusted source, and timeliness (data arrived when expected).
- How do you check referential integrity in a warehouse without foreign keys? Left join each fact to its dimensions and count rows where the dimension key is null or points at the unknown row, with an agreed threshold.
- How do you find duplicates in a target table? Group by the business key (and validity date for history tables) and keep groups with a count above one. Then trace which source rows produced them.
- How do you automate ETL checks? Keep the SQL checks in version control and run them after each load from the scheduler or CI, failing the pipeline on a breach. Frameworks such as dbt tests or Great Expectations package the common rules.
- The tables have hundreds of millions of rows. How do you compare them? Compare counts and aggregates per partition or date, compare row hashes per key instead of every column, and run full comparisons on samples and on the partitions that changed.
- Counts match but the dashboard total is wrong. Where do you look? Join fan-out (a many-to-many join duplicating facts), a filter on current dimension rows dropping history, currency or unit conversion, and time zone boundaries on the date dimension.
- How do you test a data migration? Same tools at a larger scale: counts and keys per table, column-level comparison after mapping rules, history and reference data, and business reports run on both old and new systems with the results compared.
- There is no mapping document. What do you do? Reconstruct the rules with the developer from the code and with the business owner from expected reports, write them down, and get them agreed before testing against them.
Fictional example
- Interviewer
- Finance found order 88412 twice in yesterday's sales fact. The source has it once. What do you check?
- Candidate
- First I confirm the scale: group the fact table by order ID and line number for that load date and count the duplicates, so I know whether it is one order or thousands. Then I compare the two rows. If they differ only in a dimension key, such as the customer surrogate key, the likely cause is the lookup: the customer dimension has two current rows for one customer, so the join fans out. I would run the one-current-row check on that dimension. If the two rows are identical including the load batch ID, the batch probably ran twice, which points at restart handling or a missing merge on the business key. If they have different batch IDs, the watermark may have overlapped two runs. Once I know the cause, I would add the matching check to the post-load suite, a uniqueness check on the fact grain and the SCD invariant on the dimension, so it fails the pipeline next time instead of reaching finance.
ETL testing preparation plan
- Sharpen SQL for data comparisonPractice joins,
EXCEPT,GROUP BYwithHAVING, window functions such asROW_NUMBERfor duplicates, and null-safe comparison until you can write them without looking anything up. - Run the checks aboveCreate the three tables, run each check, then fix the target data one defect at a time and watch each query come back empty.
- Learn the warehouse vocabularyFacts, dimensions, grain, surrogate keys, SCD types, staging, CDC and watermarks, each with an example from a sales or banking model.
- Write test cases from a mappingTake a ten-column mapping document (write your own if needed) and list completeness, transformation, null, duplicate and incremental test cases for it.
- Prepare two project storiesA defect you found through reconciliation, and a check you automated so the same issue could not reach users again.
ETL testing overlaps with the people who build the pipelines and the people who read the reports: data engineer interview questions and data analyst interview questions show both sides, and manual testing questions cover the test design basics interviewers still ask.
Reconciliation questions are easier when you have rehearsed saying the queries out loud in order. Natively, an AI interview assistant on Mac and Windows, transcribes a mock SQL round so you can check whether you reached the key-level comparison or stopped at counts. In practice it can read a screenshot of a query result, a mapping sheet or an error and suggest what to check next, help you write SQL, and, with Pro or the free trial, use the résumé and job description you add. Your transcripts and notes stay available to review later.
Questions people ask
What ETL testing questions are asked in interviews?
ETL versus ELT, the source-to-target mapping, facts and dimensions, completeness and accuracy checks in SQL, duplicate and null checks, SCD types, incremental loads, data quality rules and scenario questions about wrong report totals.
How do you validate data from source to target?
Compare counts, then compare business keys in both directions with EXCEPT or a left join, apply the mapping rules to the source and compare column by column, and reconcile totals such as sums per day.
How do you test an SCD Type 2 dimension?
Check that each business key has exactly one current row, that validity periods do not overlap or leave gaps, that a change closes the old row and opens a new one with a new surrogate key, and that untracked columns do not create history.
What ETL testing questions do experienced testers get?
Comparing very large tables, duplicates in a fact table, counts that match while a report is wrong, rerun and restart behavior of incremental loads, automating checks after each load and testing migrations.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
