QA and Software Testing | 45 questions | 2026
ETL Testing Interview Questions and Answers
ETL Testing interview questions for freshers 19
Q1FresherMost askedAnswerHideWhat is ETL testing and why is it needed?
ETL testing checks that data is pulled from the sources correctly. It also checks that the business rules are applied and that all the data reaches the target. The target is usually a data warehouse or a data lake.
It is needed because:
- Silent data errors (missing rows, wrong joins, cut-off text) do not crash anything. They still give wrong reports and wrong decisions.
- The transformation logic is complex and changes often.
- Data volumes and sources keep changing, so manual spot checks miss problems.
Main checks: record counts, data completeness, transformation correctness, data type and format, duplicates, referential integrity (keys match between tables), load speed, and error handling. The test basis is the source-to-target mapping document and the business rules.
What they are checking: A clear definition linked to business impact.
Q2FresherMost askedAnswerHideExplain the ETL testing process step by step.
A typical flow:
- Understand requirements: mapping document, business rules, source and target schemas, and how often the load runs.
- Plan and design tests: scope, test cases for each rule, test data, environments, and entry/exit criteria.
- Prepare test data: normal, boundary, null, duplicate and invalid records.
- Source checks: profile the source data. Confirm counts and quality before the run.
- Run the ETL and check the logs, rejected rows and job status.
- Validate: counts, source-to-target comparison, transformation logic, duplicates, integrity, data types and totals.
- Report defects with the query, sample rows, and expected vs actual result.
- Retest and regression: after each fix and each release. Include incremental runs and re-runs.
- Sign-off: a summary of coverage and open risks.
What they are checking: Can you explain a process that can be repeated?
Q3FresherMost askedAnswerHideWrite a SQL query to find customers with more than one order, and the total amount per customer.
Group by customer. Then filter the groups with HAVING. Do not use WHERE, because it filters rows before grouping.
SELECT c.customer_id,
c.name,
COUNT(o.order_id) AS order_count,
SUM(o.amount) AS total_amount
FROM customers c
JOIN orders o ON o.customer_id = c.customer_id
GROUP BY c.customer_id, c.name
HAVING COUNT(o.order_id) > 1
ORDER BY total_amount DESC;
Points to say aloud:
JOIN(inner) drops customers with no orders. UseLEFT JOINif you also need them with a zero count.- Every selected column that is not aggregated must be in
GROUP BY. COUNT(o.order_id)ignores NULLs.COUNT(*)counts all rows.
What they are checking: This is the basic live SQL task that many candidates fail.
Q4FresherMost askedAnswerHideWhat are the data quality dimensions, and how would you test each one?
Six common dimensions:
| Dimension | Meaning | Example test |
|---|---|---|
| Completeness | Required data is present | NULL count on mandatory columns is 0; row count matches source |
| Accuracy | Data is correct | Values match source or a trusted reference |
| Consistency | Same fact agrees across systems | Customer status is equal in CRM and warehouse |
| Timeliness | Data is available and fresh | Latest load time is within the SLA |
| Uniqueness | No unwanted duplicates | Primary key / business key has no repeats |
| Validity | Follows the format and rules | Dates parse, codes are in the allowed list, amounts are not negative |
Automate them as SQL checks or rules in a tool (Great Expectations, dbt tests). Run them on every load, with thresholds and alerts.
What they are checking: Do you know the terms, and can you turn them into tests?
Q5FresherMost askedAnswerHideHow do you validate record counts between source and target, and what if they do not match?
Run count queries on both sides. Use the same filters that the ETL applies.
-- source
SELECT COUNT(*) FROM src.orders WHERE order_date >= DATE '2026-01-01';
-- target
SELECT COUNT(*) FROM dw.fact_orders WHERE order_date >= DATE '2026-01-01';
If the counts differ, investigate:
- Missing rows: find them with
EXCEPT/LEFT JOIN ... WHERE t.key IS NULL. - Extra rows: duplicates from a bad join, or rows not removed after a delete in the source.
- Legitimate filtering: rejects, deduplication, status filters. Check the reject table and the mapping rules.
- Timing: the source changed after the extract. Compare at the same cut-off time.
A matching count is needed but not enough. It can hide one missing row and one duplicated row.
What they are checking: Do you understand the limits of count checks?
Q6FresherMost askedAnswerHideWrite SQL to find duplicate records in a table.
Group by the columns that define a duplicate. Keep the groups with more than one row.
SELECT email, COUNT(*) AS cnt
FROM customers
GROUP BY email
HAVING COUNT(*) > 1;
To see the full duplicate rows, use a window function:
SELECT *
FROM (
SELECT c.*,
COUNT(*) OVER (PARTITION BY email) AS cnt
FROM customers c
) t
WHERE cnt > 1
ORDER BY email;
Say what counts as a duplicate: the primary key, or a business key (email, or customer_id + order_date). A table can have no duplicate primary keys and still have duplicate business records with different surrogate ids (system-made ids).
What they are checking: The live query that candidates fail most often.
Q7FresherMost askedAnswerHideHow do you test for NULL values and how does NULL behave in SQL comparisons and aggregates?
Test for NULLs with IS NULL / IS NOT NULL. = NULL never matches.
SELECT COUNT(*) FROM dw.dim_customer WHERE email IS NULL;
Behaviour to know:
- Any comparison with NULL gives unknown. So
col <> 'X'leaves out NULL rows too. COUNT(col)skips NULLs.COUNT(*)counts all rows.SUMandAVGignore NULLs. AVG divides by the count of non-NULL values.NULL = NULLis not true. UseIS NOT DISTINCT FROMorCOALESCEwhen you compare source and target.- NOT IN with a subquery that returns a NULL returns no rows. Prefer
NOT EXISTS.
Check against the mapping. Mandatory columns must have zero NULLs. Optional columns should show NULL (not an empty string or 'N/A') exactly as the rule says.
What they are checking: Do you know the classic SQL traps?
Q8FresherMost askedAnswerHideHow do you find records that exist in the source but are missing in the target?
Two standard SQL approaches. Both use the business key.
-- Anti-join
SELECT s.order_id
FROM src.orders s
LEFT JOIN dw.fact_orders t ON t.order_id = s.order_id
WHERE t.order_id IS NULL;
-- Set difference (EXCEPT in PostgreSQL/SQL Server, MINUS in Oracle)
SELECT order_id FROM src.orders
EXCEPT
SELECT order_id FROM dw.fact_orders;
Swap the tables to find extra rows in the target. If the databases are on different servers, load the keys into a staging table. Or use a comparison tool or script (pandas merge with indicator=True). Check the reject table before you raise a defect. The row may have been rejected on purpose.
What they are checking: A basic reconciliation query.
Q9FresherMost askedFree with sign-inAnswerHideWhat are Slowly Changing Dimensions (SCD) and the main types?
SCDs describe how a dimension handles changes in its attributes over time.
Q10FresherMost askedFree with sign-inAnswerHideHow do you test reports and dashboards (BI testing)?
Check that what users see is right, from the data to the display.
Q11FresherMost askedFree with sign-inAnswerHideWhat is the difference between INNER JOIN, LEFT JOIN and FULL OUTER JOIN, and why does it matter in data testing?
- INNER JOIN: only rows that match on both sides.
- LEFT JOIN: all rows from the left table, and the matched rows from the right (NULLs where there is no match).
- FULL OUTER JOIN: all rows from both tables, with NULLs where there is no match.
Q12FresherMost askedFree with sign-inAnswerHideWhat is the difference between ETL and ELT?
Both move data into an analytics store. They differ in where the transformation happens.
Q13FresherMost askedFree with sign-inAnswerHideWhat types of ETL testing are there?
Common categories:
- Source-to-target (data completeness) testing: all expected records arrive.
- Data transformation testing: business rules are applied correctly.
- Data quality testing: duplicates, nulls, formats, ranges.
- Data integrity / referential testing: keys and relationships stay correct. -...
Q14FresherMost askedFree with sign-inAnswerHideWhat are boundary and range checks in data testing? Give examples.
Boundary testing applies boundary value analysis to data. Test the minimum, the maximum, and values just inside and just outside the allowed range.
Q15FresherMost askedFree with sign-inAnswerHideWhat is the difference between full load and incremental load?
- Full load: wipe and reload the whole dataset each run. It is simple and consistent. It gets slow and heavy as data grows.
- Incremental (delta) load: load only the records inserted or changed since the last run. It uses timestamps, version numbers, or change data capture.
Q16FresherMost askedFree with sign-inAnswerHideWhat kinds of defects do you typically find in data testing, and how do you report them?
Common data defects:
- Missing or extra records, and duplicates
- Wrong transformation (calculation, mapping, case, trimming)
- Cut-off text, rounding and data type conversion errors
- Wrong NULL/default handling
- Referential integrity breaks and orphan keys
- Date and time zone mistakes
- Wrong history handling (SCD) or gaps in incremental loads
- Rejected records not logged
- Slow performance and job failures
Q17FresherMost askedFree with sign-inAnswerHideWrite a SQL query to find the second highest salary, and the highest salary per department.
Two common live tasks.
Q18FresherMost askedFree with sign-inAnswerHideHow do you validate data types, lengths and constraints between source and target?
Compare the metadata with the mapping document. Do not just look at it by eye.
Q19FresherMost askedFree with sign-inAnswerHideWhat is the difference between a data warehouse, a data lake and a database from a testing point of view?
- Database (OLTP): normalised, transactional, current data. Test CRUD, constraints and transactions.
- Data warehouse (OLAP): joined, historical data, modelled (facts and dimensions) for analytics. Test ETL correctness, history (SCD), totals, query speed and report accuracy.
- Data lake: raw files of any...
ETL Testing interview questions for experienced 16
Q20ExperiencedMost askedAnswerHideHow do you perform source-to-target validation?
Compare the source and target at several levels, from cheap to deep.
- Counts: row counts per table and per partition or date.
- Totals: SUM, MIN, MAX, AVG on number columns. Distinct counts on keys.
- Set comparison: find missing and extra rows with
EXCEPT/MINUSor an anti-join, on the business key. - Column-level comparison: join on the key. Apply the documented transformation, then compare each mapped column.
- Hash/checksum comparison for wide tables.
- Sampling with business review for complex rules.
-- rows in source but not in target
SELECT order_id, customer_id, amount FROM src.orders
EXCEPT
SELECT order_id, customer_id, amount FROM dw.fact_orders;
Run it in both directions. Allow for known differences in the expected result, such as rejected rows, filtered statuses and type casts. Otherwise the comparison has too much noise.
What they are checking: A layered method, not just 'compare counts'.
Q21ExperiencedMost askedAnswerHideGive an example of transformation testing and how you verify a business rule.
Rule: 'customer_tier is GOLD when lifetime spend is at least 10000, SILVER at least 5000, otherwise BRONZE. NULL spend counts as 0.'
Approach: work out the expected value on your own from the source. Then compare it with the target.
WITH expected AS (
SELECT customer_id,
CASE WHEN COALESCE(SUM(amount), 0) >= 10000 THEN 'GOLD'
WHEN COALESCE(SUM(amount), 0) >= 5000 THEN 'SILVER'
ELSE 'BRONZE' END AS tier
FROM src.orders GROUP BY customer_id
)
SELECT e.customer_id, e.tier AS expected, d.customer_tier AS actual
FROM expected e
JOIN dw.dim_customer d ON d.customer_id = e.customer_id
WHERE d.customer_tier <> e.tier;
Zero rows means the rule holds. Add test data at the boundaries (4999.99, 5000, 9999.99, 10000, NULL) and negative cases. Never copy the developer's SQL as the expected result. Write the expectation from the requirement.
What they are checking: An independent expected result, and boundary test design.
Q22ExperiencedMost askedFree with sign-inAnswerHideHow do you test an SCD Type 2 dimension load?
Prepare a changed record in the source. Run the load. Then check the old and new rows.
Q23ExperiencedMost askedFree with sign-inAnswerHideHow would you automate data validation with Python?
Use pandas or SQLAlchemy with pytest for repeatable checks. Run them in CI after each load.
Q24ExperiencedMost askedFree with sign-inAnswerHideHow do you use checksums or hashes to compare large tables?
Compute a hash of each row's relevant columns on both sides and compare them. This is faster than comparing every column by hand.
Q25ExperiencedMost askedFree with sign-inAnswerHideWrite SQL to remove duplicates but keep the latest record per key.
Number the rows within each key, newest first. Then delete everything except row 1.
Q26ExperiencedMost askedFree with sign-inAnswerHideHow do you test referential integrity in a data warehouse?
Check that every foreign key in a fact table points to a dimension row that exists. Also check that unknown values are handled by design.
Q27ExperiencedMost askedFree with sign-inAnswerHideWhat is data reconciliation and how do you do it?
Data reconciliation means confirming that the data in two systems or layers agrees for the same business scope. You must also explain every difference.
Q28ExperiencedMost askedFree with sign-inAnswerHideWrite SQL to reconcile daily totals between a source table and a warehouse table.
Total both sides by day and join them. Flag any difference.
Q29ExperiencedMost askedFree with sign-inAnswerHideWhat is idempotency in ETL, and how do you test it?
An idempotent pipeline gives the same final result whether a run executes once or many times for the same input. This makes retries and backfills (reloading old data) safe.
Q30ExperiencedMost askedFree with sign-inAnswerHideHow do you test error handling and rejected records in an ETL job?
Feed in bad data on purpose. Check that the pipeline behaves as specified.
Q31ExperiencedMost askedFree with sign-inAnswerHideWhat is Great Expectations and how do you use it for data testing?
Great Expectations (GX) is an open-source Python framework. You write data quality checks, called Expectations, and run them. It gives readable validation reports.
Q32ExperiencedMost askedFree with sign-inAnswerHideWhat are dbt tests and how do you write them?
dbt tests are SQL checks that run with dbt test. A test passes when its query returns zero rows.
Generic tests are declared in YAML:
Q33ExperiencedMost askedFree with sign-inAnswerHideHow do you test AI or LLM features whose outputs are non-deterministic?
You cannot assert an exact string. So test the properties of the output and measure quality with statistics.
Q34ExperiencedMost askedFree with sign-inAnswerHideHow do you test masking and protection of PII or PHI in a data pipeline?
Check that sensitive data is protected wherever it is stored, moved or shown.
Q35ExperiencedMost askedFree with sign-inAnswerHideHow would you validate coded healthcare or finance fields, for example ICD-10 diagnosis codes, in a dataset?
Check the format with a pattern. Check validity against the official reference table.
Format check (ICD-10-CM codes look like E11.9: a letter, two characters, an optional dot and up to four more):
Scenario based ETL Testing interview questions 10
Q36ExperiencedMost askedScenarioFree with sign-inAnswerHideHow do you test incremental loads?
An incremental load processes only the records that are new or changed since the last run. It usually uses a watermark (a timestamp or id) or change data capture.
Q37ExperiencedMost askedScenarioFree with sign-inAnswerHideA dashboard shows a different number than the source system. How do you find the cause?
Trace the number backwards, layer by layer. Split the problem in half each time.
Q38ExperiencedMost askedScenarioFree with sign-inAnswerHideThe row counts match between source and target, but the business says some values are wrong. What do you do?
Matching counts only prove the number of rows. Move to row-level and column-level comparison.
Q39ExperiencedMost askedScenarioFree with sign-inAnswerHideAfter the daily load, duplicates appear in the fact table. How do you investigate?
Find what is duplicated, then find out why.
- Define the duplicate. Is it the same business key, or a whole-row copy?
Q40ExperiencedMost askedScenarioFree with sign-inAnswerHideThe ETL job shows 'success' but yesterday's data is missing in the report. What do you check?
A green job does not prove the data is correct. Work outward from the symptom.
Q41ExperiencedMost askedScenarioFree with sign-inAnswerHideWhat is data migration testing and what do you validate?
Migration testing checks that data moved from an old system to a new one is complete, correct and usable.
Q42ExperiencedMost askedScenarioFree with sign-inAnswerHideA source system adds a column and changes a data type without notice, and the pipeline breaks or silently loads wrong data. How do you test for and prevent this?
This is schema drift. Approach:
Q43ExperiencedMost askedScenarioFree with sign-inAnswerHideHow do you compare two large tables in different databases efficiently?
Do not pull everything into one place. Compare summaries first. Look closely only where they differ.
Q44ExperiencedMost askedScenarioFree with sign-inAnswerHideHow do you test timeliness and late-arriving data?
Timeliness: data must be available by the SLA time.
- Check the latest load time and compare it with now. Alert if the lag is above the limit.
- Test the job's start and end time against the time window with realistic volume.
Q45ExperiencedMost askedScenarioFree with sign-inAnswerHideHow do you handle testing when the source data keeps changing during your test run?
You need a stable snapshot that you can compare against.