ETL Testing Interview Questions SQL – Complete Interview Guide with Real-Time Scenarios

1. What is ETL Testing? (Definition + Example)

ETL Testing is the process of validating data as it moves through the Extract → Transform → Load (ETL) pipeline to ensure accuracy, completeness, consistency, and performance before it is stored in a Data Warehouse (DW). The primary objective of ETL testing is to verify that data is extracted correctly from source systems, transformed according to business requirements, and loaded into the target system without any data loss, duplication, or corruption. 

Unlike functional testing, which validates application behavior, ETL testing focuses on validating data quality, business transformations, database integrity, and reporting accuracy. ETL testers use SQL queries extensively to compare source and target data, verify business rules, and identify discrepancies before the data is consumed by reporting or analytics applications. 

Simple Example 

Consider a retail organization that receives customer order data from an operational database and loads it into a data warehouse for reporting. 

Source 

The ETL process extracts data from: 

  • OLTP system (Orders table).  

The source table contains raw transactional data generated through customer purchases. 

Transformation 

Before loading the data into the warehouse, several business rules are applied, including: 

  • Currency conversion.  
  • Deduplication.  
  • Business rule implementation.  

Additional transformations may include data cleansing, lookup validations, data standardization, surrogate key generation, and derived column calculations. 

Target 

After successful transformation, the processed data is loaded into: 

  • Fact_Sales table in the Data Warehouse.  

This fact table stores measurable business information that supports reporting and analytical queries. 

ETL Testing Ensures 

A successful ETL testing process verifies that: 

  • Correct records are extracted from the source systems.  
  • Transformations follow the defined business logic.  
  • Loaded data matches the Source-to-Target (S2T) mapping.  
  • No data loss, duplication, or performance issues occur during ETL execution.  

By performing these validations, ETL testers help ensure that business reports, dashboards, and analytical systems are built on accurate and reliable data. 

Data Warehouse Flow: Source → Staging → Transform → Load → Reporting 

Understanding the complete data warehouse flow is essential for ETL testing because each stage has a specific purpose and requires different validation activities. Interviewers frequently ask candidates to explain this architecture and describe the validations performed at every layer. 

Data Warehouse Layers and Their Responsibilities 

Layer Purpose 
Source Transactional systems such as ERP, CRM, flat files, and APIs that generate raw operational data. 
Staging Temporary landing zone where raw extracted data is stored before transformations are applied. 
Transformation Applies business rules, joins, aggregations, data cleansing, and Slowly Changing Dimension (SCD) processing. 
Target (DW) Stores fact and dimension tables optimized for reporting, analytics, and business intelligence. 
Reporting Provides dashboards, KPIs, reports, and analytical insights through BI tools. 

Source Layer 

The source layer is where business data originates. Data is extracted from various operational systems that support day-to-day business activities. 

Common source systems include: 

  • ERP systems.  
  • CRM systems.  
  • OLTP databases.  
  • Flat files.  
  • APIs.  

At this stage, ETL testers typically validate data availability, record counts, mandatory fields, and source data quality before extraction begins. 

Staging Layer 

The staging layer acts as a temporary landing zone for raw extracted data. Minimal or no business transformations are performed at this stage. 

The staging layer is used to: 

  • Store extracted source data.  
  • Perform initial data validations.  
  • Compare source and staging record counts.  
  • Support ETL restart and recovery.  
  • Isolate source systems from downstream processing.  

ETL testers validate that all expected records are successfully extracted into the staging area without modification. 

Transformation Layer 

The transformation layer applies business logic to convert raw operational data into meaningful business information suitable for reporting and analysis. 

Typical transformation activities include: 

  • Business rule implementation.  
  • Joins.  
  • Aggregations.  
  • Slowly Changing Dimension (SCD) processing.  

Additional transformations often include duplicate removal, lookup validations, data enrichment, standardization, currency conversion, and calculated fields. 

ETL testers validate that each business rule defined in the Source-to-Target mapping document has been implemented correctly. 

Target (Data Warehouse) 

After transformation, the processed data is loaded into the target data warehouse. 

The target layer typically contains: 

  • Fact tables.  
  • Dimension tables.  

These tables are designed for analytical processing and provide a centralized repository of integrated and historical business data. 

ETL testers validate record counts, data accuracy, key relationships, business rules, and audit fields after the data is loaded into the warehouse. 

Reporting Layer 

The reporting layer allows business users to access warehouse data through dashboards and analytical reports. 

Typical reporting components include: 

  • Business Intelligence (BI) tools.  
  • Dashboards.  
  • Key Performance Indicators (KPIs).  
  • Executive reports.  

The accuracy of reports depends entirely on the quality of the data stored in the warehouse, making ETL testing an essential part of the reporting lifecycle. 

ETL Architecture & Mapping Validation 

Understanding ETL architecture and Source-to-Target (S2T) mapping validation is a fundamental requirement for ETL testers. Interviewers frequently ask candidates to explain the different components of an ETL architecture and describe how mapping documents are validated using SQL. 

ETL Architecture Components 

A typical enterprise ETL architecture consists of several interconnected components that move data from operational systems to analytical platforms. 

Source Systems 

Source systems generate raw business data that serves as the input for ETL processing. 

Examples include: 

  • OLTP databases.  
  • ERP applications.  
  • CRM systems.  
  • Flat files.  
  • External APIs.  

Staging Tables 

Staging tables temporarily store extracted data before any business transformations are applied. 

They help: 

  • Store raw data.  
  • Perform initial validations.  
  • Support ETL restartability.  
  • Simplify troubleshooting.  

ETL Tool 

An ETL tool is responsible for extracting data, applying transformation logic, and loading the processed data into the target warehouse. 

Common ETL tools include: 

  • Informatica.  
  • Microsoft SSIS.  
  • Ab Initio.  

These tools automate ETL workflows while ensuring that business transformation rules are applied consistently. 

Data Warehouse 

The processed data is stored in a centralized Data Warehouse using dimensional modeling techniques. 

Common data warehouse schemas include: 

  • Star Schema.  
  • Snowflake Schema.  

These schemas organize data into fact and dimension tables to support efficient reporting and analytical queries. 

Reporting Layer 

The reporting layer provides business users with meaningful insights using Business Intelligence platforms. 

Examples include: 

  • Power BI.  
  • Tableau.  
  • Enterprise reporting tools.  

This layer delivers dashboards, reports, and KPIs that support operational monitoring and strategic decision-making. 

Mapping Validation 

Source-to-Target (S2T) mapping validation ensures that every target column accurately reflects the corresponding source column and that all business transformation rules are implemented correctly. 

Typical mapping validation activities include: 

Column-to-Column Checks 

Verify that every source column is correctly mapped to its corresponding target column according to the mapping document. 

Data Type and Length Validation 

Ensure that data types, field lengths, precision, and scale are correctly maintained after transformation and loading. 

Transformation Logic Validation 

Verify that all business rules, calculations, lookup transformations, aggregations, and derived fields have been implemented exactly as specified in the Source-to-Target mapping document. 

Default Values and Audit Fields 

Validate that default values are populated correctly whenever required and confirm that audit fields—such as batch IDs, load timestamps, created dates, and updated dates—are populated accurately for every ETL execution. 

Proper mapping validation ensures data integrity throughout the ETL process and helps guarantee that the final data warehouse accurately represents the business requirements defined by stakeholders. 

4. ETL Testing Interview Questions SQL (Basic → Advanced) 

Below are 70+ interview-tested ETL testing interview questions SQL with crisp answers. 

Basic ETL & SQL Questions (1–20) 

 1. What is ETL testing? 

Answer: 

ETL (Extract, Transform, Load) Testing is the process of validating data as it moves through an ETL pipeline to ensure that it is extracted correctly from source systems, transformed according to business rules, and loaded accurately into the target data warehouse or data mart. 

The primary objective of ETL testing is to ensure data quality, integrity, completeness, consistency, and performance throughout the entire data movement process. Unlike functional testing, ETL testing focuses on validating data rather than application functionality. 

An ETL tester verifies: 

  • Correct extraction of data from source systems.  
  • Proper implementation of business transformation rules.  
  • Accurate loading of data into the target warehouse.  
  • Source-to-Target (S2T) mapping compliance.  
  • Record count consistency.  
  • Data integrity and referential integrity.  
  • Data quality and completeness.  
  • Report accuracy.  

For example, if an online retail company extracts customer order data from an OLTP database, applies currency conversion, removes duplicate records, calculates total sales, and loads the processed data into a data warehouse, the ETL tester validates every stage to ensure that the final reports reflect accurate business information. 

2. What is the difference between ETL and ELT? 

Answer: 

Although ETL and ELT are both data integration approaches, they differ mainly in the sequence of transformation and loading. 

ETL (Extract → Transform → Load) 

In ETL, data is first extracted from the source systems, transformed in a staging or ETL environment according to business rules, and then loaded into the target data warehouse. 

Characteristics include: 

  • Transformation occurs before loading.  
  • Requires an ETL engine or processing server.  
  • Common in traditional enterprise data warehouses.  
  • Better suited for complex business transformations before data storage.  

ELT (Extract → Load → Transform) 

In ELT, data is extracted and loaded directly into the target system first. Transformations are then performed inside the target database or cloud data warehouse. 

Characteristics include: 

  • Transformation occurs after loading.  
  • Leverages the processing power of modern cloud platforms.  
  • Suitable for large-scale data environments.  
  • Commonly used with cloud data warehouses such as Snowflake, BigQuery, and Azure Synapse.  

The main difference is that ETL transforms data before loading, whereas ELT transforms data after it has been loaded into the destination system. 

3. What is a staging table? 

Answer: 

A staging table is a temporary storage area used during ETL processing to hold raw extracted data before any business transformations are applied. 

The staging layer serves several important purposes: 

  • Stores extracted source data safely.  
  • Supports initial data validation.  
  • Enables comparison between source and staging data.  
  • Isolates source systems from downstream processing.  
  • Simplifies ETL restart and recovery.  

Because staging tables contain unprocessed data, they make it easier to identify extraction issues before business rules are applied. 

4. What is Source-to-Target (S2T) mapping? 

Answer: 

Source-to-Target (S2T) Mapping is a document that defines how source columns are mapped to target columns, along with all business transformation rules that need to be applied during ETL processing. 

An S2T mapping document generally includes: 

  • Source table names.  
  • Source column names.  
  • Target table names.  
  • Target column names.  
  • Data types.  
  • Transformation rules.  
  • Lookup conditions.  
  • Default values.  
  • Reject logic.  
  • Business validation rules.  

ETL developers use this document to build ETL jobs, while ETL testers use it to validate that every transformation has been implemented correctly. 

5. What SQL query checks record count? 

Answer: 

Record count validation is one of the most common ETL testing activities. It ensures that the number of records loaded into the target matches the number extracted from the source after applying the expected business rules. 

SELECT COUNT(*) 
FROM source_orders; 
 
SELECT COUNT(*) 
FROM target_fact_orders; 

This validation helps identify: 

  • Missing records.  
  • Duplicate records.  
  • Loading failures.  
  • Incorrect filtering.  
  • ETL job failures.  

If the source and target counts differ unexpectedly, the tester investigates the ETL logic, rejected records, and transformation rules to identify the root cause. 

6. What is data reconciliation? 

Answer: 

Data reconciliation is the process of comparing data between the source system and the target system to ensure that all records have been transferred accurately and completely. 

Reconciliation activities typically include: 

  • Record count comparison.  
  • Data value comparison.  
  • Aggregate validation.  
  • Business rule verification.  
  • Reject record validation.  
  • Financial total comparison.  

Reconciliation is a critical activity because it confirms that no data has been lost, duplicated, or modified incorrectly during ETL processing. 

7. What are audit columns? 

Answer: 

Audit columns are special fields that store metadata about ETL processing. They help track when and how records were loaded or modified and simplify troubleshooting and data lineage analysis. 

Common audit columns include: 

  • load_date  
  • batch_id  
  • created_by  
  • updated_ts  

Additional audit fields may include load timestamps, process IDs, job names, and source system identifiers. These fields are essential for monitoring ETL executions and maintaining traceability. 

8. What is a surrogate key? 

Answer: 

A surrogate key is a system-generated unique identifier used in a data warehouse instead of a natural business key. 

Unlike natural keys, surrogate keys are generated internally and remain stable even if business attributes change. They are commonly used in dimension tables to maintain relationships with fact tables and support Slowly Changing Dimension (SCD) implementations. 

Surrogate keys can be generated using: 

  • Database sequences.  
  • Identity columns.  
  • UUIDs.  
  • Auto-increment mechanisms.  

9. What is the difference between fact and dimension tables? 

Answer: 

Fact tables store measurable business data, while dimension tables store descriptive information that provides context to the facts. 

Fact Table 

Contains quantitative business measures such as: 

  • Sales amount.  
  • Revenue.  
  • Quantity.  
  • Profit.  

Fact tables also contain foreign keys that reference dimension tables. 

Dimension Table 

Contains descriptive attributes such as: 

  • Customer.  
  • Product.  
  • Time.  
  • Location.  
  • Employee.  

Dimension tables help users analyze facts from different business perspectives. 

10. What is data profiling? 

Answer: 

Data profiling is the process of analyzing source data before ETL processing begins to understand its quality, structure, and content. 

Typical profiling activities include: 

  • Null value analysis.  
  • Duplicate detection.  
  • Data type validation.  
  • Pattern analysis.  
  • Range validation.  
  • Data completeness assessment.  

Data profiling helps identify potential data quality issues before they affect downstream ETL processing. 

11. What is truncation testing? 

Answer: 

Truncation testing ensures that data is not unintentionally truncated when it is loaded into the target database. 

For example, if the source column allows 100 characters but the target column allows only 50 characters, ETL testers verify whether data is truncated, rejected, or handled according to business requirements. 

This testing helps prevent data loss caused by column length mismatches. 

12. What is referential integrity in a Data Warehouse? 

Answer: 

Referential integrity ensures that every foreign key value in a fact table has a corresponding primary key value in the related dimension table. 

For example, every customer_key stored in a sales fact table should exist in the customer dimension table. 

Maintaining referential integrity prevents orphan records and ensures accurate reporting. 

13. What SQL validates null values? 

Answer: 

The following SQL query identifies records where the email column contains NULL values: 

SELECT COUNT(*) 
FROM dim_customer 
WHERE email IS NULL; 

This validation helps determine whether: 

  • Mandatory fields contain unexpected NULL values.  
  • Default values are applied correctly.  
  • Reject logic is functioning as expected.  
  • Source data quality issues exist.  

14. What is incremental load? 

Answer: 

Incremental loading is an ETL technique in which only new or modified records are processed during each ETL execution. 

Incremental loads typically rely on: 

  • Last updated timestamp.  
  • Watermark columns.  
  • Change Data Capture (CDC).  

This approach reduces processing time and improves ETL performance compared to full data loads. 

15. What is full load? 

Answer: 

A full load reloads the entire dataset into the target system during every ETL execution. 

It is commonly used: 

  • During the initial data load.  
  • After major schema changes.  
  • When incremental loading is not feasible.  

Although full loads are simple to implement, they require more processing time and resources. 

16. What is checksum or hashing in ETL? 

Answer: 

Checksums or hash values are generated from one or more columns to detect changes in data efficiently. 

Instead of comparing every column individually, ETL testers compare hash values to identify modified records. 

Hashing is commonly used for: 

  • Incremental loads.  
  • Data reconciliation.  
  • Duplicate detection.  
  • SCD processing.  

Common hash algorithms include MD5 and SHA. 

17. What is CDC (Change Data Capture)? 

Answer: 

Change Data Capture (CDC) is a technique used to identify new, updated, or deleted records in source systems so that only changed data is processed during incremental ETL loads. 

CDC improves ETL performance by avoiding unnecessary processing of unchanged records. 

18. What is the difference between INNER JOIN and LEFT JOIN? 

Answer: 

An INNER JOIN returns only records that have matching values in both tables. 

A LEFT JOIN returns all records from the left table, along with matching records from the right table. If no match exists, NULL values are returned for the right table. 

LEFT JOIN is commonly used in ETL testing to identify missing target records during reconciliation. 

19. What is data lineage? 

Answer: 

Data lineage refers to the complete lifecycle of data, showing how it moves from the source system through extraction, transformation, and loading until it reaches reports or dashboards. 

It helps organizations understand: 

  • Data origin.  
  • Transformation history.  
  • Processing steps.  
  • Report dependencies.  
  • Data ownership.  

Data lineage is essential for troubleshooting, compliance, and impact analysis. 

20. What is the difference between data validation and data verification? 

Answer: 

Although these terms are closely related, they have different purposes. 

Data Validation ensures that the data satisfies business rules and quality requirements. Examples include validating calculations, checking mandatory fields, and verifying transformation logic. 

Data Verification ensures that data has moved correctly from one stage to another without loss or corruption. It focuses on confirming that the extracted, transformed, and loaded data matches across systems. 

In ETL testing, both validation and verification are essential to ensure that data is accurate, complete, and reliable before it is used for reporting or analytics. 

Intermediate SQL & ETL Questions (21–45) 

21. How do you validate JOIN logic in ETL? 

Answer: 

JOIN validation ensures that the ETL process correctly combines data from multiple source tables based on the defined business relationships. Incorrect join conditions can result in missing records, duplicate records, or incorrect business data being loaded into the target system. 

ETL testers validate: 

  • Join conditions defined in the S2T mapping.  
  • Record counts before and after joins.  
  • Duplicate records caused by incorrect joins.  
  • Missing records due to incorrect join types.  
  • Data accuracy after joining multiple tables.  

SQL Example 

SELECT o.order_id, 
c.customer_name 
FROM orders o 
JOIN customers c 
ON o.customer_id = c.customer_id; 

Purpose: 

This query validates that each order is correctly associated with its corresponding customer. If expected customer information is missing or duplicate rows appear, the join logic should be investigated. 

22. How do you detect duplicate records? 

Answer: 

Duplicate record validation is one of the most common ETL testing activities. Duplicate records usually occur because of incorrect joins, improper incremental loading, missing primary keys, or faulty business logic. 

SQL Example 

SELECT order_id, 
COUNT(*) 
FROM staging_orders 
GROUP BY order_id 
HAVING COUNT(*) > 1; 

Purpose: 

This query identifies duplicate order_id values in the staging table. Any record returned by this query indicates a duplicate that requires investigation. 

23. What is Slowly Changing Dimension (SCD)? 

Answer: 

A Slowly Changing Dimension (SCD) is a technique used in data warehouses to manage changes in dimension data over time. 

Since customer information, product details, or employee information may change, SCD techniques define how those changes should be handled while maintaining data integrity. 

Common SCD types include: 

  • Type 1 – Overwrite existing values.  
  • Type 2 – Preserve history by creating new records.  

SCDs help organizations maintain accurate historical reporting. 

24. What is the difference between SCD Type 1 and SCD Type 2? 

Answer: 

SCD Type 1 

  • Overwrites old data.  
  • Does not maintain historical information.  
  • Only the latest value is stored.  

SCD Type 2 

  • Maintains historical data.  
  • Inserts a new record whenever changes occur.  
  • Uses start date, end date, and active flag.  
  • Supports historical reporting.  

SCD Type 2 is much more common in enterprise data warehouse projects because historical tracking is often a business requirement. 

25. SCD Type 2 SQL Validation Example 

Answer: 

The following query identifies customers having multiple records. 

SELECT customer_id, 
COUNT(*) 
FROM dim_customer 
GROUP BY customer_id 
HAVING COUNT(*) > 1; 

Purpose: 

This query helps verify that historical records exist where expected. ETL testers should additionally verify that only one record is marked as active and that effective dates do not overlap. 

26. How do you validate aggregations? 

Answer: 

Aggregation validation ensures that calculations such as totals, averages, counts, minimums, and maximums are correctly implemented during ETL processing. 

SQL Example 

SELECT customer_id, 
SUM(order_amount) 
FROM fact_orders 
GROUP BY customer_id; 

Purpose: 

This query validates that customer-level sales totals stored in the fact table accurately represent the detailed transactional data. 

27. What is a late arriving dimension? 

Answer: 

A late arriving dimension occurs when a fact record reaches the data warehouse before its corresponding dimension record. 

For example: 

  • A sales transaction arrives today.  
  • Customer information arrives tomorrow.  

ETL systems typically handle this situation using inferred members, default dimension records, or delayed processing until the required dimension becomes available. 

28. How do you handle NULL values in ETL? 

Answer: 

Handling NULL values depends on business requirements. 

Common approaches include: 

  • Replacing NULLs with default values.  
  • Rejecting invalid records.  
  • Applying transformation rules.  
  • Logging data quality issues.  
  • Sending records to reject tables for further investigation.  

ETL testers validate that NULL handling follows the business rules defined in the Source-to-Target mapping. 

29. What is a lookup transformation? 

Answer: 

A lookup transformation retrieves related information from reference or lookup tables during ETL processing. 

Typical uses include: 

  • Fetching surrogate keys.  
  • Validating master data.  
  • Retrieving product information.  
  • Validating country codes.  
  • Mapping customer categories.  

Lookup transformations help enrich data before loading it into the warehouse. 

30. How do you validate date transformations? 

Answer: 

Date transformation validation ensures that dates are correctly converted, formatted, and calculated during ETL processing. 

SQL Example 

SELECT order_date 
FROM fact_orders 
WHERE order_date > CURRENT_DATE; 

Purpose: 

This query identifies invalid future dates that may indicate transformation errors or incorrect business logic. 

31. What is the difference between TRUNCATE and DELETE? 

Answer: 

Although both commands remove data, they behave differently. 

DELETE 

  • Removes selected rows.  
  • Supports WHERE clause.  
  • Can be rolled back (depending on the database and transaction settings).  
  • Slower for large tables.  

TRUNCATE 

  • Removes all rows.  
  • Does not support WHERE clause.  
  • Generally faster.  
  • Often cannot be rolled back in many database systems.  
  • Resets storage more efficiently.  

TRUNCATE is commonly used before full ETL loads. 

32. What is data drift? 

Answer: 

Data drift refers to unexpected changes in the source data that may affect ETL processing. 

Examples include: 

  • New columns added.  
  • Data type changes.  
  • Unexpected NULL values.  
  • Different value distributions.  
  • New business codes.  

ETL testers monitor data drift to ensure that ETL jobs continue functioning correctly when source systems change. 

33. How do you validate currency conversion? 

Answer: 

Currency conversion validation ensures that exchange rates are applied correctly during ETL transformations. 

SQL Example 

SELECT amount_local, 
exchange_rate, 
amount_usd 
FROM staging_sales; 

Validation: 

Verify that: 

amount_usd = amount_local × exchange_rate 

The calculated value should match the business rule and the target data. 

34. What is a reject table? 

Answer: 

A reject table stores records that fail ETL validations or business rules. 

Typical reasons for rejection include: 

  • Mandatory fields missing.  
  • Invalid data types.  
  • Duplicate business keys.  
  • Lookup failures.  
  • Constraint violations.  

ETL testers validate reject counts and ensure rejected records are logged appropriately. 

35. What is metadata testing? 

Answer: 

Metadata testing verifies the structural properties of database objects rather than the data itself. 

It includes validating: 

  • Table structures.  
  • Column names.  
  • Data types.  
  • Column lengths.  
  • Constraints.  
  • Indexes.  
  • Primary keys.  
  • Foreign keys.  

Metadata testing ensures that the target schema matches design specifications. 

36. What is a control table? 

Answer: 

A control table stores ETL execution information such as: 

  • Batch ID.  
  • Load status.  
  • Start time.  
  • End time.  
  • Record counts.  
  • Job status.  

Control tables help monitor ETL executions and simplify restartability. 

37. How do you validate record count after transformation? 

Answer: 

After transformations, ETL testers verify that the expected number of records remains available according to business rules. 

SQL Example 

SELECT COUNT(*) 
FROM staging_orders 
WHERE status = ‘ACTIVE’; 

Purpose: 

This query validates that only active records proceed to the next ETL stage. 

38. What is data skew? 

Answer: 

Data skew occurs when data is distributed unevenly across partitions or processing nodes. 

Consequences include: 

  • Uneven workload distribution.  
  • Slow ETL jobs.  
  • Resource bottlenecks.  
  • Longer execution times.  

Proper partitioning strategies help reduce data skew. 

39. What is partitioning in a Data Warehouse? 

Answer: 

Partitioning divides large database tables into smaller logical sections to improve query performance and ETL processing. 

Common partition types include: 

  • Range partitioning.  
  • List partitioning.  
  • Hash partitioning.  

Partitioning reduces scan time and improves query efficiency. 

40. What is the indexing strategy in ETL? 

Answer: 

Indexes improve query performance but slow down bulk inserts. 

Therefore, a common ETL strategy is: 

  • Drop or disable indexes before large data loads.  
  • Perform ETL loading.  
  • Rebuild indexes after loading.  

This approach balances loading speed and query performance. 

41. What are surrogate key generation methods? 

Answer: 

Common surrogate key generation methods include: 

  • Database sequences.  
  • Identity columns.  
  • UUIDs.  
  • Auto-increment columns.  

The selected method depends on database capabilities and project requirements. 

42. What is data archival testing? 

Answer: 

Data archival testing verifies that historical data is archived according to business and compliance requirements. 

ETL testers validate: 

  • Archived records.  
  • Archive location.  
  • Data completeness.  
  • Retrieval capability.  
  • Retention policies.  

43. What is the difference between OLTP and OLAP? 

Answer: 

OLTP (Online Transaction Processing) 

  • Supports daily business transactions.  
  • Fast inserts, updates, and deletes.  
  • Highly normalized.  
  • Optimized for transactional processing.  

OLAP (Online Analytical Processing) 

  • Supports reporting and analytics.  
  • Stores historical data.  
  • Uses dimensional modeling.  
  • Optimized for complex analytical queries.  

44. What is transformation logic testing? 

Answer: 

Transformation logic testing verifies that every business rule defined in the Source-to-Target mapping has been implemented correctly. 

Typical validations include: 

  • Calculations.  
  • Lookup logic.  
  • Data conversions.  
  • Business conditions.  
  • Aggregations.  
  • Default values.  

45. What is idempotent ETL? 

Answer: 

An idempotent ETL process produces the same result regardless of how many times it is executed with the same input data. 

This ensures: 

  • No duplicate records.  
  • No inconsistent updates.  
  • Safe ETL restarts.  
  • Reliable incremental processing.  

Advanced SQL & Performance Questions (46–70) 

46. Window function example in ETL validation 

Answer: 

Window functions help validate rankings, latest records, running totals, and partition-based calculations. 

SQL Example 

SELECT customer_id, 
ROW_NUMBER() OVER 
(PARTITION BY customer_id 
ORDER BY updated_ts DESC) AS rn 
FROM dim_customer; 

Purpose: 

This query assigns a sequence number to each customer’s records, with the most recent record receiving rn = 1. It is commonly used to identify the latest version of a record in Slowly Changing Dimension (SCD) Type 2 implementations. 

47. How do you validate the latest record in SCD Type 2? 

Answer: 

In SCD Type 2, the latest version of a record is usually identified using a current flag or active flag

Typical validation steps include: 

  • Filter records where current_flag = ‘Y’ or is_active = ‘Y’.  
  • Verify that only one active record exists for each business key.  
  • Ensure historical records have correct start and end dates.  
  • Check that effective date ranges do not overlap.  

This validation confirms that historical tracking has been implemented correctly. 

48. How do you identify missing records? 

Answer: 

Missing record validation ensures that all expected source records are successfully loaded into the target table. 

SQL Example 

SELECT s.id 
FROM source s 
LEFT JOIN target t 
ON s.id = t.id 
WHERE t.id IS NULL; 

Purpose: 

This query identifies records that exist in the source but are missing from the target, helping detect ETL failures, filtering issues, or rejected records. 

49. What is ETL performance testing? 

Answer: 

ETL performance testing measures how efficiently an ETL process performs under expected workloads. 

Typical performance metrics include: 

  • Load time.  
  • Throughput.  
  • CPU utilization.  
  • Memory usage.  
  • Database I/O.  
  • Job execution time.  
  • SLA compliance.  

The objective is to ensure that ETL jobs complete within the required performance targets while maintaining data quality. 

50. How do you tune slow ETL jobs? 

Answer: 

When an ETL job runs slower than expected, several optimization techniques can be applied. 

Common tuning strategies include: 

  • Indexing.  
  • Partitioning.  
  • Pushdown optimization.  
  • Query optimization.  
  • Eliminating unnecessary transformations.  
  • Parallel processing.  
  • Optimizing joins.  
  • Reviewing execution plans.  

These techniques improve ETL performance and help meet project SLAs. 

51. What is bulk load? 

Answer: 

Bulk load is a high-performance data loading technique used to insert large volumes of records into a database efficiently. 

Benefits include: 

  • Faster loading.  
  • Reduced logging.  
  • Improved ETL performance.  
  • Lower resource consumption.  

Bulk loading is commonly used during initial warehouse loads or when processing very large datasets. 

52. What is pushdown optimization? 

Answer: 

Pushdown optimization is a technique where transformation logic is executed directly within the database instead of the ETL tool. 

Advantages include: 

  • Reduced network traffic.  
  • Faster execution.  
  • Better database resource utilization.  
  • Improved overall ETL performance.  

This approach is especially useful when working with large datasets. 

53. How do you validate historical data accuracy? 

Answer: 

Historical data validation ensures that past records are stored correctly and reflect changes over time. 

Validation activities include: 

  • Comparing effective_date ranges.  
  • Verifying start and end dates.  
  • Checking current and historical flags.  
  • Ensuring no overlapping date ranges.  
  • Confirming that historical values are preserved.  

This is particularly important for SCD Type 2 implementations. 

54. What is a factless fact table? 

Answer: 

A factless fact table is a fact table that does not contain measurable numeric values. 

Instead, it records the occurrence of business events. 

Examples include: 

  • Student attendance.  
  • Employee training completion.  
  • Product promotion participation.  
  • Customer account registration.  

Factless fact tables help answer questions about whether an event occurred rather than measuring quantities. 

55. How do you test error handling? 

Answer: 

Error handling testing verifies that the ETL process correctly identifies, logs, and manages invalid or failed records. 

Validation activities include: 

  • Checking reject table counts.  
  • Reviewing ETL execution logs.  
  • Verifying error messages.  
  • Ensuring failed records are isolated.  
  • Confirming successful records continue processing.  

Proper error handling improves reliability and simplifies troubleshooting. 

56. What is a late arriving fact? 

Answer: 

A late arriving fact occurs when a fact record reaches the data warehouse after the reporting period or after related dimensions have already been processed. 

ETL systems handle late arriving facts by: 

  • Updating historical reports.  
  • Reprocessing affected records.  
  • Using correction batches.  
  • Maintaining accurate historical analytics.  

57. How do you validate data freshness? 

Answer: 

Data freshness validation ensures that the latest available data has been successfully loaded into the warehouse. 

SQL Example 

SELECT MAX(load_date) 
FROM fact_sales; 

Purpose: 

This query retrieves the most recent load date and helps confirm that the warehouse contains the latest available data according to the ETL schedule. 

58. What is data balancing? 

Answer: 

Data balancing verifies that totals remain consistent across different stages of the ETL process. 

Typical balancing activities include comparing: 

  • Record counts.  
  • Sales totals.  
  • Financial amounts.  
  • Aggregated values.  
  • Business metrics.  

Data balancing ensures that no information is lost or altered during processing. 

59. What is ETL regression testing? 

Answer: 

ETL regression testing verifies that new changes, enhancements, or bug fixes do not impact existing ETL functionality. 

It includes validating: 

  • Existing business rules.  
  • Source-to-target mappings.  
  • Historical reports.  
  • Data quality.  
  • Performance.  

Regression testing ensures that previously validated functionality continues to work correctly after ETL modifications. 

60. How do you validate negative scenarios? 

Answer: 

Negative testing ensures that the ETL process correctly handles invalid or unexpected data. 

Common negative scenarios include: 

  • Invalid data formats.  
  • NULL values.  
  • Boundary values.  
  • Duplicate records.  
  • Missing mandatory fields.  
  • Invalid reference data.  

ETL testers verify that such records are rejected, logged, or processed according to business rules. 

61. What is parallel processing? 

Answer: 

Parallel processing allows multiple ETL tasks or data partitions to run simultaneously rather than sequentially. 

Benefits include: 

  • Faster execution.  
  • Improved throughput.  
  • Better resource utilization.  
  • Reduced ETL load times.  

It is widely used in enterprise ETL environments that process large volumes of data. 

62. What is a watermark column? 

Answer: 

A watermark column is a timestamp or sequence column used to identify new or modified records during incremental ETL loads. 

Common watermark columns include: 

  • last_updated_date  
  • modified_timestamp  
  • batch_id  

Watermark columns enable efficient incremental loading by processing only changed records. 

63. How do you validate decimal precision? 

Answer: 

Decimal precision validation ensures that numeric values maintain the required scale and precision after transformation. 

SQL Example 

SELECT CAST(amount AS DECIMAL(10,2)) 
FROM staging; 

Purpose: 

This query verifies that monetary values are stored with the correct number of decimal places, helping prevent rounding errors and ensuring financial accuracy. 

64. What is data anonymization testing? 

Answer: 

Data anonymization testing verifies that Personally Identifiable Information (PII) and other sensitive data are properly masked or anonymized according to security and compliance requirements. 

Typical validations include: 

  • Masking customer names.  
  • Encrypting sensitive fields.  
  • Replacing personal identifiers.  
  • Verifying irreversible anonymization where required.  

This testing helps ensure compliance with data privacy regulations. 

65. What is a reconciliation report? 

Answer: 

A reconciliation report summarizes the results of ETL validation by comparing data across source, staging, and target systems. 

A typical reconciliation report includes: 

  • Record counts.  
  • Aggregate totals.  
  • Reject counts.  
  • Duplicate counts.  
  • Missing records.  
  • Load status.  

It provides a concise overview of ETL quality and highlights any discrepancies requiring investigation. 

66. How do you test ETL restartability? 

Answer: 

ETL restartability testing verifies that an ETL job can resume safely after a failure without causing duplicate records or missing data. 

Validation activities include: 

  • Simulating ETL failures.  
  • Restarting from the failure point.  
  • Verifying control table updates.  
  • Checking record consistency.  
  • Ensuring idempotent processing.  

Successful restartability testing confirms that the ETL process can recover without compromising data integrity. 

67. What is schema evolution testing? 

Answer: 

Schema evolution testing validates that ETL processes continue to work correctly when the source schema changes. 

Examples include: 

  • New columns added.  
  • Columns removed.  
  • Data type modifications.  
  • Column length changes.  
  • Renamed fields.  

ETL testers ensure that these schema changes do not break existing ETL logic or reporting. 

68. What is data latency? 

Answer: 

Data latency is the time delay between when data is updated in the source system and when it becomes available in the data warehouse for reporting. 

Low latency is essential for near real-time analytics, while higher latency may be acceptable for batch processing, depending on business requirements. 

69. How do you validate derived columns? 

Answer: 

Derived column validation ensures that calculated values generated during ETL processing are accurate. 

Testers compare the derived value in the target with the expected value calculated from the source data using the business formula. 

Examples include: 

  • Total price = Quantity × Unit Price.  
  • Discount amount.  
  • Profit margin.  
  • Tax calculations.  

Any discrepancies indicate an issue in the transformation logic. 

70. What is end-to-end ETL testing? 

Answer: 

End-to-end ETL testing validates the complete data flow from the source system to the final reports or dashboards. 

It verifies every stage of the ETL lifecycle, including: 

  • Source data extraction.  
  • Staging validations.  
  • Transformation logic.  
  • Source-to-Target (S2T) mapping.  
  • Data warehouse loading.  
  • Fact and dimension validation.  
  • Report and dashboard verification.  
  • Data reconciliation.  

The goal is to ensure that data remains accurate, complete, and consistent throughout the entire ETL pipeline so that business users receive reliable information for reporting and decision-making.  

5. Real SQL Validation Examples (Sample Dataset) 

Real-time ETL testing heavily relies on SQL queries to validate data accuracy, business rules, and successful data movement from source systems to the data warehouse. The following sample dataset and SQL examples demonstrate how ETL testers validate transformed data in real projects. 

Sample Source Dataset 

Source Orders Table 

order_id customer_id amount 
101 500 
102 300 

This source table represents transactional order data extracted from an OLTP system before ETL processing. 

Target Fact Table Validation 

Once the ETL process loads data into the fact table, aggregation validation is performed to ensure business calculations are accurate. 

SQL Query 

SELECT customer_id, 
SUM(amount) AS total_amount 
FROM fact_orders 
GROUP BY customer_id; 

Purpose 

This query validates that: 

  • Sales amounts are correctly aggregated.  
  • Business transformation logic has been applied correctly.  
  • No duplicate or missing records exist.  
  • Customer-wise totals match the expected business calculations.  

Expected Output 

customer_id total_amount 
101 500 
102 300 

If the totals differ from the source data after considering business rules, the ETL tester investigates the transformation logic, joins, aggregations, and rejected records to identify the root cause. 

6. Scenario-Based ETL Testing Questions 

Scenario-based questions are among the most frequently asked ETL interview questions because they evaluate a candidate’s practical troubleshooting skills rather than theoretical knowledge. Interviewers expect candidates to explain how they would investigate issues, write SQL queries, identify root causes, and validate the final solution. 

Scenario 1: Record Count Mismatch 

Scenario 

After the ETL job completes successfully, the source table contains 100,000 records, but the target table contains 99,850 records

Possible Causes 

  • Incorrect filter conditions.  
  • Records moved to reject tables.  
  • Failed transformations.  
  • Duplicate removal logic.  
  • Incremental load issues.  
  • Source extraction failures.  

Validation Steps 

  • Compare source and target record counts.  
  • Verify staging table counts.  
  • Check reject tables.  
  • Review ETL execution logs.  
  • Validate filter conditions.  
  • Verify business transformation rules.  
  • Identify duplicate or rejected records.  

Expected Result 

Every missing record should be accounted for either through valid business rules or reject processing. 

Scenario 2: Null Values Appearing in Target 

Scenario 

Mandatory columns such as Customer Email contain unexpected NULL values in the target table. 

Possible Causes 

  • Missing source values.  
  • Incorrect default value logic.  
  • Lookup failures.  
  • Transformation errors.  
  • Reject logic not implemented.  

Validation Steps 

  • Compare source and target data.  
  • Verify default value rules.  
  • Check lookup transformations.  
  • Validate business rules.  
  • Review reject tables.  

Expected Result 

Mandatory fields should contain valid values, default values, or rejected records according to business requirements. 

Scenario 3: Performance Degradation 

Scenario 

An ETL job that previously completed in 30 minutes now takes 90 minutes

Possible Causes 

  • Missing indexes.  
  • Large table scans.  
  • Data growth.  
  • Inefficient joins.  
  • Poor execution plans.  
  • Partitioning issues.  

Resolution Steps 

  • Analyze indexes.  
  • Review execution plans.  
  • Optimize SQL queries.  
  • Partition large tables.  
  • Reduce unnecessary transformations.  
  • Enable parallel processing where appropriate.  

Expected Result 

ETL execution time should return to acceptable SLA limits without affecting data accuracy. 

Scenario 4: Duplicate Facts 

Scenario 

Duplicate records are found in the fact table after ETL execution. 

Possible Causes 

  • Incorrect join conditions.  
  • Missing surrogate key logic.  
  • Faulty incremental loading.  
  • Duplicate source records.  
  • ETL restart issues.  

Validation Steps 

  • Validate surrogate key generation.  
  • Check business keys.  
  • Compare source and target data.  
  • Verify incremental load logic.  
  • Review duplicate detection rules.  

Expected Result 

Each business transaction should appear only once in the fact table unless duplicate records are explicitly required by the business. 

7. ETL Tools Used in Projects 

Different organizations use different ETL tools depending on project requirements, data volume, technology stack, and enterprise architecture. Although the tools may differ, ETL testing concepts remain the same. 

Common ETL Tools 

Informatica 

One of the most widely used enterprise ETL tools. 

Common features include: 

  • Graphical ETL development.  
  • Workflow management.  
  • Data quality integration.  
  • High-performance transformations.  
  • Extensive database support.  

Microsoft SSIS (SQL Server Integration Services) 

Microsoft’s ETL platform used primarily in SQL Server environments. 

Common capabilities include: 

  • Data migration.  
  • Workflow automation.  
  • Data transformation.  
  • SQL Server integration.  
  • Package scheduling.  

Ab Initio 

A high-performance ETL platform commonly used in banking, financial services, and telecommunications. 

Key advantages include: 

  • Parallel processing.  
  • Large-scale data integration.  
  • High-speed ETL execution.  
  • Enterprise-grade performance.  

Pentaho 

An open-source ETL and Business Intelligence platform. 

Common uses include: 

  • Data integration.  
  • Data transformation.  
  • Reporting.  
  • Dashboard creation.  
  • Data migration.  

Talend 

A modern data integration platform supporting cloud and on-premises ETL. 

Features include: 

  • Data integration.  
  • Data quality.  
  • API integration.  
  • Cloud connectivity.  
  • Big data support.  

8. ETL Defect Examples + Test Case 

Interviewers frequently ask candidates to explain real production defects they have encountered. Demonstrating how you identified the root cause and resolved the issue shows practical ETL testing experience. 

ETL Defect Example 

Defect 

Duplicate customer records in an SCD Type 2 dimension table. 

Root Cause 

The ETL process did not implement a hash key to detect changes in business attributes. As a result, unchanged records were inserted repeatedly, creating multiple active records for the same customer. 

Fix 

Implement an MD5 hash (or another checksum algorithm) on the business key and relevant attributes. During each ETL run, compare the current hash value with the previous one. 

  • If the hash value changes, create a new historical record.  
  • If the hash value remains the same, do not insert a duplicate record.  

This approach prevents unnecessary duplicate records while preserving valid historical changes. 

Sample ETL Test Case 

Field Value 
Scenario Validate SCD Type 2 Change 
SQL Validation COUNT per customer_id 
Expected Result Only one active record should exist for each customer while historical records are maintained correctly. 

Validation Steps 

  1. Execute the ETL job.  
  1. Verify the source data and business changes.  
  1. Compare hash values for existing and incoming records.  
  1. Validate start date, end date, and active flag.  
  1. Confirm that only one record has the active indicator set to Y.  
  1. Ensure historical records are preserved with correct effective dates.  

9. Quick Revision Sheet 

Before attending an ETL testing interview, quickly revise these core concepts that are commonly asked in technical discussions. 

Validate Data Quality 

Always verify: 

  • Record counts.  
  • Aggregate totals.  
  • Duplicate records.  
  • Missing records.  
  • NULL values.  
  • Business transformations.  
  • Data reconciliation.  

Understand SCD Concepts 

Be clear about the differences between: 

  • SCD Type 1 – Overwrites existing data without maintaining history.  
  • SCD Type 2 – Maintains historical records using start date, end date, and active flag.  

Interviewers frequently ask both conceptual questions and SQL validation queries related to SCD implementations. 

Practice SQL Thoroughly 

Strong SQL skills are essential for ETL testing. 

Focus on writing and understanding queries using: 

  • JOINs.  
  • GROUP BY.  
  • Aggregate functions.  
  • Window functions.  
  • Subqueries.  
  • Record count validation.  
  • Duplicate detection.  
  • Missing record validation.  
  • Data reconciliation.  

Being able to explain why each query is used is just as important as writing the query itself. 

Always Reconcile Source and Target 

The final and most important validation in ETL testing is source-to-target reconciliation

Before signing off on an ETL load, verify that: 

  • Source and target record counts match according to business rules.  
  • Business transformations are correctly implemented.  
  • No unexpected duplicate or missing records exist.  
  • Aggregate totals are accurate.  
  • Data integrity and referential integrity are maintained.  
  • Audit fields are populated correctly.  
  • Reports generated from the data warehouse reflect the expected business results.  

A systematic reconciliation process ensures that the ETL pipeline delivers accurate, consistent, and reliable data for downstream reporting, analytics, and business decision-making. 

10. FAQs (Featured Snippet Ready) 

Q1. What SQL is most used in ETL testing? 

Answer: 

SQL is the most important technical skill for ETL testers because almost every validation activity involves querying databases and comparing data between source and target systems. ETL testers use SQL to validate data quality, business transformations, and data warehouse integrity throughout the ETL process. 

The SQL concepts most used in ETL testing include: 

  • JOINs (INNER JOIN, LEFT JOIN, RIGHT JOIN) for comparing source and target data and validating relationships between tables.  
  • GROUP BY for validating aggregations and summarized business data.  
  • COUNT() for record count validation and reconciliation.  
  • SUM(), AVG(), MIN(), and MAX() for validating calculations and aggregate values.  
  • Window functions such as ROW_NUMBER(), RANK(), and SUM() OVER() for validating SCD Type 2 logic, identifying duplicate records, and performing partition-based calculations.  
  • Subqueries for complex data validation.  
  • CASE expressions for validating conditional transformation logic.  
  • EXISTS and NOT EXISTS for identifying missing or unmatched records.  
  • UNION and UNION ALL for combining datasets.  
  • Date functions for validating incremental loads and date transformations.  

Interviewers frequently ask candidates to write SQL queries for scenarios such as: 

  • Record count validation.  
  • Source-to-target data comparison.  
  • Duplicate record detection.  
  • Missing record identification.  
  • Aggregation validation.  
  • SCD Type 2 validation.  
  • Data reconciliation.  
  • Performance analysis.  

Strong SQL skills are considered essential because they enable ETL testers to identify defects quickly and validate large datasets efficiently. 

Q2. Is SQL enough for ETL testing? 

Answer: 

No. While SQL is the foundation of ETL testing, it is not sufficient on its own. A successful ETL tester requires a combination of database knowledge, ETL concepts, business understanding, and familiarity with ETL tools. 

An ETL tester should have knowledge of: 

  • SQL for writing validation queries and comparing source and target data.  
  • ETL tools such as Informatica, Microsoft SSIS, Talend, Ab Initio, or Pentaho to understand ETL workflows and data movement.  
  • Data Warehouse concepts including fact tables, dimension tables, Star Schema, Snowflake Schema, and Slowly Changing Dimensions (SCDs).  
  • Source-to-Target (S2T) mapping to validate business transformations and column mappings.  
  • Business domain knowledge (such as banking, insurance, healthcare, or retail) to understand business rules and reporting requirements.  
  • Data quality concepts including duplicate detection, null handling, data reconciliation, and referential integrity.  
  • Performance testing basics to analyze ETL job execution time, query performance, and SLA compliance.  

In real projects, ETL testing is a combination of SQL expertise, ETL tool knowledge, analytical thinking, and an understanding of business processes. Interviewers typically evaluate all of these areas rather than SQL alone. 

Q3. What is the most important ETL testing skill? 

Answer: 

The most important skill for an ETL tester is the ability to analyze data using SQL while understanding the underlying business logic. ETL testing is not just about executing SQL queries—it is about interpreting the results, identifying data inconsistencies, and ensuring that business requirements are implemented correctly. 

The key skills expected from an ETL tester include: 

  • Strong SQL expertise for validating data, writing complex queries, and troubleshooting ETL issues.  
  • Data analysis skills to identify mismatches, duplicates, missing records, and transformation errors.  
  • Understanding of ETL processes including extraction, transformation, and loading.  
  • Knowledge of Data Warehouse concepts such as fact tables, dimension tables, Star Schema, Snowflake Schema, and SCD Type 1 and Type 2.  
  • Ability to validate Source-to-Target (S2T) mappings and business transformation rules.  
  • Problem-solving skills to investigate ETL failures, analyze root causes, and verify fixes.  
  • Attention to detail to ensure data accuracy, completeness, and consistency.  
  • Communication skills to explain defects, collaborate with ETL developers, and discuss business requirements with stakeholders.  

Among all these skills, SQL expertise combined with strong data analysis and business understanding is what distinguishes an effective ETL tester and is often the primary focus during ETL testing interviews. 

Leave a Comment

Your email address will not be published. Required fields are marked *