Coding

What Is a Data Lake? Definition, Examples and How It Works

A data lake is a centralized storage repository that holds large amounts of data in its original, raw format, whether that data is structured, semistructured or unstructured. Structure is applied when you read the data, not when you store it, which is what separates a data lake from a data warehouse.

The definitions below come from the Microsoft Azure Architecture Center and AWS documentation, read in November 2026. Vendors differ in details, so where they disagree this article says so.

What is a data lake, in plain terms?

Think of two ways to keep documents. In one, you sort every document into a labelled folder the moment it arrives, rewriting it into a standard format first. In the other, you dump everything into one big store exactly as it arrived and sort it out only when someone asks a question. A data warehouse works like the first. A data lake works like the second.

AWS defines a data lake as "a centralized repository that allows you to store all your structured and unstructured data at any scale." Microsoft describes it as a storage repository that holds large volumes of data in its native, raw format and scales cost effectively to terabytes and petabytes.

The data usually comes from many sources and can include three kinds:

  • Structured: relational tables, such as rows exported from a transactional database.
  • Semistructured: JSON, XML and log files.
  • Unstructured: images, audio and video.

What does schema-on-read mean?

A schema is the description of a dataset's structure: which columns exist, what type each one has, how tables relate. In a data warehouse you define the schema first and transform incoming data to fit it. Microsoft calls this schema-on-write.

A data lake stores data in its original, untransformed state and applies a transformation only when the data is needed. That is schema-on-read. AWS puts it the same way: the structure of the data is not defined when data is captured.

The practical effect is that you can start collecting data before you know what questions you will ask. A raw log file you saved last year can be parsed next year in a way nobody planned for. The cost is that every reader has to do the interpretation work, so the same file can be read differently by two teams if nobody documents it.

Data lake vs data warehouse

This table follows the comparison in Microsoft's architecture guide.

FeatureData lakeData warehouse
Data typeRaw: unstructured, semistructured and structuredStructured, curated data in relational schemas
SchemaSchema-on-readSchema-on-write
LatencyHigher, because processing happens at query timeLow, because data is preprocessed
CostLower storage cost; compute is paid when data is processed or queriedHigher, because of dedicated compute and performance tuning
Best forBig data, machine learning, exploratory analyticsBI, reporting, structured analysis

AWS adds one more distinction: a warehouse holds relational data from transactional systems and business applications, cleaned into a "single source of truth", while a lake holds that same relational data plus non-relational data from sources such as mobile apps, IoT devices and social media.

If you only need to answer known questions about structured business data, a warehouse is the simpler tool. If you need to keep varied raw data for analysis you cannot yet describe, or to train machine learning models, a lake fits better. For a refresher on querying the structured side, see SQL for beginners.

What are data lakes used for?

Microsoft lists five common use cases:

  • Data ingestion and movement: collecting data from cloud services, IoT devices, on-premises systems and streams into one place.
  • Big data processing: handling high-volume, high-velocity data with distributed processing frameworks.
  • Analytics and machine learning: exploratory analysis and training AI models on large, varied datasets.
  • Business intelligence and reporting: feeding curated subsets of lake data into warehouses or BI tools.
  • Archiving and compliance: keeping historical or raw data for long-term retention and audit.

AWS describes similar benefits, including faster decision making from combining more sources, better customer insight from joining CRM, purchase and support data, and lower operating costs from analyzing machine-generated IoT data. Those are vendor claims about potential, not measured outcomes.

Event streaming and IoT are a natural fit, since high-velocity data has to be stored at scale without a fixed schema up front. Microsoft names real-time monitoring, predictive maintenance and anomaly detection as examples. Lakes can also sit upstream of a warehouse: raw data lands in the lake, and the warehouse transforms it into structured form later, an approach called extract, load, transform (ELT). If you run scheduled jobs over large record sets, what is batch processing covers how that style of work operates.

How a data lake is organized

A modern lake has two core parts. The first is storage, which has to provide durability, fault tolerance, scalability and high-throughput ingestion. The second is processing: engines such as Apache Spark that run large transformations, analytics and machine learning over the stored files. Mature setups add metadata management, security and governance.

Microsoft describes a layered design called the medallion architecture:

  • Raw (bronze): data as ingested, with minimal transformation.
  • Cleansed (silver): validated and transformed data, ready for analytics and machine learning.
  • Curated (gold): aggregated, business-ready datasets for reports and dashboards.

In storage this often shows up as a folder convention. This is an illustrative layout, not a required one:

lake/
  bronze/orders/2026/11/19/orders-001.json
  silver/orders/2026/11/19/orders.parquet
  gold/daily_revenue/2026-11-19.parquet

Each layer improves quality as data moves along, and Microsoft says the design improves data quality, governance and performance. On Azure the storage layer is typically Azure Data Lake Storage, which combines Blob Storage with data lake capabilities.

What are the problems with data lakes?

Microsoft lists several challenges, and they are worth reading before you build one:

  • Data quality and governance. Diverse sources and formats make standards hard to enforce. Cataloging and metadata management are critical.
  • Data integrity. Without validation and monitoring, errors or incomplete ingestions can damage the reliability of what the lake holds.
  • Performance at scale. Query performance and storage efficiency can degrade as the lake grows, so partitioning, indexing and caching may be needed.
  • Small files. Many small files add query and per-file overhead, so teams sometimes compact them. Microsoft advises testing on representative data before rewriting a whole dataset.
  • Security and access control. Permissions and auditing across many datasets need planning to prevent misuse of sensitive data.
  • Discoverability. Without a catalog, a lake can turn into a data swamp, where valuable data exists but cannot be found or understood.

Retention is a trade-off too. Keeping raw originals supports audit and replay, but multiple copies of the same data raise storage needs. A retention policy can remove derived or duplicate copies once no access, recovery or compliance requirement remains.

When you should not use a data lake

The sources above do not give a checklist, but the comparison table points to the answer. A lake has higher query latency and puts transformation work on the reader. If your data is small, structured and used for routine dashboards, a conventional database or warehouse gives faster queries with less to manage. A lake earns its complexity when data is large, varied, or not yet fully understood.

Frequently asked questions

What is the difference between a data lake and a data warehouse?
A data lake stores data in its raw, original format and applies structure only when the data is read (schema-on-read). A data warehouse defines its schema in advance and transforms data as it is loaded (schema-on-write). Lakes suit exploration and machine learning; warehouses suit reporting and BI.
What is a data swamp?
A data swamp is a data lake that has lost track of what it holds. Without cataloging, metadata and governance, the data is present but nobody can find it or trust it, so it goes unused.
What is a lakehouse?
A lakehouse is an approach that combines the raw, low-cost storage of a data lake with the structured query performance of a data warehouse. Microsoft's architecture guidance notes that lakes and warehouses often coexist in this way.
Does a data lake replace a database?
No. A database or warehouse is built for fast, structured queries and transactions. A data lake is a storage layer for large volumes of varied data. Many organizations run both, with the lake feeding the warehouse.

Sources