Data Lake Testing: Strategy, Checks and an Azure Data Lake Example

A data lake stores huge amounts of raw and processed data in files. Testing it is different from testing a database because there are no enforced schemas or constraints by default: testers must check files, schemas, partitions and data quality across zones.

What Is a Data Lake?

A data lake is low-cost storage (Azure Data Lake Storage Gen2, Amazon S3 or Google Cloud Storage) holding data in many formats: CSV, JSON, Parquet, Avro, logs and images. Data is usually organised in zones:

Diagram
raw / bronze      -> data as received, never changed
cleansed / silver -> standardised, deduplicated, typed
curated / gold    -> business-ready tables for reporting and ML

Data Lake Testing vs Data Warehouse Testing

Data warehouseData lake
SchemaEnforced on writeOften applied on read
ConstraintsKeys and constraints availableUsually none; testers must check
DataStructured tablesFiles of many formats
Main toolsSQLSpark SQL, PySpark, Athena/Synapse serverless SQL

Warehouse checks: data warehouse testing.

Data Lake Testing Strategy

  1. Ingestion: every expected file arrived, complete and readable.
  2. Schema: columns and types match the contract; schema changes are detected.
  3. Data quality: nulls, duplicates, ranges and formats in cleansed data.
  4. Transformation: curated outputs match business rules; totals reconcile across zones.
  5. Partitions and formats: correct folder partitioning, compression and file sizes.
  6. Security and governance: access controls, masking of personal data, catalog metadata.
  7. Performance: queries and jobs within SLAs; no huge numbers of tiny files.

Checks by Zone

ZoneKey checks
RawFile count and names per batch, file sizes, record counts vs source, no corrupt files, raw data unchanged
CleansedSchema and types, deduplication, standardised values, rejected records captured
CuratedBusiness rules, aggregates reconcile to cleansed data, keys unique, ready for BI

Spark SQL Examples

SQL
-- Records per partition in raw vs cleansed
SELECT dt, COUNT(*) FROM raw.orders GROUP BY dt ORDER BY dt;
SELECT dt, COUNT(*) FROM silver.orders GROUP BY dt ORDER BY dt;

-- Duplicates after cleansing
SELECT order_id, COUNT(*) FROM silver.orders GROUP BY order_id HAVING COUNT(*) > 1;

-- Curated totals reconcile with cleansed
SELECT (SELECT SUM(amount) FROM silver.orders WHERE dt = '2026-10-01')
     - (SELECT SUM(total_sales) FROM gold.daily_sales WHERE sales_date = '2026-10-01') AS diff;

Azure Data Lake Testing Example

On Azure, data typically lands in ADLS Gen2 through Azure Data Factory and is processed by Databricks or Synapse:

  • Check ADF copy activity outputs (rows read and copied) for each file.
  • Query files with Synapse serverless SQL or Databricks to count and profile them.
  • Validate Delta tables in silver and gold with the checks above, and use DESCRIBE HISTORY to see what each run changed.

Full walkthrough: Azure Data Factory and Databricks testing. AWS equivalent: AWS Glue ETL testing.

Common Data Lake Issues

  • Silent schema drift: a source adds or renames a column and downstream jobs misread data.
  • Small-files problem: thousands of tiny files slow every query.
  • Wrong partition values: data written to the wrong date folder.
  • Duplicates from replays: the same file processed twice.
  • Unmasked personal data in zones that many users can read.

Related: big data testing.

Data testing skills: SQL for testers · data migration testing · Power BI testing · big data testing · data quality checks · ETL tools list · ADF & Databricks testing · database testing interview questions · Python for testers · data reconciliation · SQL joins · test data management · ETL defects examples · Snowflake ETL testing · AWS Glue testing

Data warehouse basics: data warehouse concepts · star vs snowflake schema · fact and dimension tables · SCD types · data reconciliation · data warehouse testing · data warehouse interview questions

Frequently Asked Questions

What is data lake testing?

It is validating that data ingested into and processed within a data lake is complete, correctly structured, of good quality and correctly transformed across raw, cleansed and curated zones.

How is data lake testing different from data warehouse testing?

Data lakes store files without enforced schemas or constraints, so testers must check files, schemas, partitions and formats as well as data values, usually with Spark or serverless SQL.

What tools are used for data lake testing?

Spark SQL and PySpark (often in Databricks), Athena or Synapse serverless SQL, Great Expectations and cloud data quality features.

What is a data lake testing strategy?

A plan covering ingestion completeness, schema validation, data quality, transformation correctness, partitions and formats, security and performance.

What is Azure Data Lake testing?

Testing data stored in Azure Data Lake Storage Gen2, typically loaded by Azure Data Factory and processed by Databricks or Synapse.

Asim Noaman Lodhi
Written by

Asim Noaman Lodhi

Certified Google Partner · QA Consultant · 12+ Years IT

QA consultant specializing in ETL testing and data quality. Trained 913+ students to transition into data testing roles through hands-on, real-world instruction.

4.5 Rating 913+ Students Google Partner 79 Lectures

Build the Foundations for Data Lake Testing

ETL testing, data warehouse basics, data quality and Python, the skills every lake tester uses. 79 lectures, $19.00.

Preview Free Lectures on Udemy