Lecture: Lecture 06 - Data Lakes

The problem

A warehouse is excellent when the organization knows which questions it must answer and can define a consistent schema in advance. It is less convenient when useful data arrives in many formats or future questions are unknown.

A data lake keeps broad source material available so it can be explored later. A lake can hold relational rows, JSON documents, text, images, audio and transformed datasets in one storage environment.

How a lake works

The defining idea is schema-on-read:

  1. Store source data with its original structure or format.
  2. Catalog and locate the relevant material.
  3. At analysis time, interpret fields and create the structure needed for the question.
  4. Clean, join and transform the data before analysis.

This differs from a warehouse’s schema-on-write, where the target structure and meanings are agreed before data is loaded.

Example

Suppose a university stores course registrations, forum messages, attendance scans and lecture recordings.

  • A warehouse can provide a curated report of registrations by course and semester.
  • A lake can retain registration rows, message text, scan events and recordings for future questions about engagement or attendance.

The lake does not automatically answer those questions. An analyst must decide what counts as participation, reconcile student and course identifiers, handle missing scans and select an appropriate time window.

Why lakes are useful

They help when:

  • not all future questions are known in advance,
  • data comes from many systems and formats,
  • storage is inexpensive enough to retain raw material,
  • teams need self-service exploration,
  • or new analytical methods may require data that was not originally modeled for reporting.

They can also reduce information silos by making source material available to more than one analytical team.

The main tradeoff

A lake provides earlier and broader access, but it delays some organization work. The price appears later as data wrangling, quality checks, semantic interpretation, metadata maintenance and governance.

Raw data stored together is co-located, not necessarily integrated. Two files may use different product IDs, currencies or definitions even though they are in the same repository.

From lake to swamp

A data swamp is a lake that has become difficult to use. Typical causes are:

  • no catalog or ownership,
  • unclear field meanings,
  • uncertain quality and freshness,
  • duplicated or incompatible datasets,
  • uncontrolled access and expensive queries,
  • and collecting data without a decision or user in mind.

Governance is therefore part of the architecture. Useful controls include searchable metadata, lineage, naming conventions, access policies, quality checks, lifecycle rules and clearly defined curated areas.

The source’s practical warning is to begin with a manageable scope. Keeping less data with a clear route to value can be better than building an inaccessible repository of everything.

Common confusions

ConfusionCorrection
A lake is just a cheaper warehouseA lake changes when structure and preparation are applied, and accepts broader formats
Raw means uselessRaw data may become valuable, but it needs context and preparation
Co-located means integratedIntegration requires reconciled identifiers, units and meanings
Schema-on-read means no schemaA schema is still needed when data is interpreted; it is chosen later
A lake removes IT workWork shifts toward catalogs, governance, pipelines and analyst wrangling

Retrieval questions with answers

Why would a lake be chosen for a question that is not known today?

Because it preserves varied source material before a fixed reporting schema is chosen. Later users can select and shape the subset required by a new question.

A lake contains sales data from two systems. Is it integrated because both files are stored together?

No. Integration requires checking identifiers, units, definitions and quality. Storage location alone only makes the data co-located.

What makes a lake a swamp?

Users cannot reliably find, interpret or trust its contents because cataloging, ownership, semantics and governance are missing.

When is a warehouse preferable?

When recurring business questions are known, definitions must be stable, and analysts need fast, trusted reporting over curated historical data.