Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Modelling Data for BI  ›  Lesson

Warehouse, Lake and Mart

Data Warehouse 12 minA data lake stores raw data of any shape cheaply, a data warehouse stores cleaned, integrated tables with history for reporting, and a data mart is a focused slice of the warehouse for one team.

Warehouse, Lake and Mart

In his first month, Ishaan ran his reports straight against the online shop's live database. On the first morning of the April sale, his big monthly query ran just as hundreds of shoppers were checking out, and checkout slowed to a crawl. Kabir moved him off it that afternoon. Reporting data needs a home of its own, and there are three common kinds.

The rule

Lake keeps everything raw; warehouse keeps it clean; mart serves one team.

Store What it holds Structure Main users At Weftwise
Source system The live records the business runs on Fixed, built for fast small writes The application The shop's order database
Data lake Raw files of any shape: JSON, CSV, logs, images Decided when someone reads them Engineers, data scientists Courier JSON files, website click logs, product photos
Data warehouse Cleaned, joined tables with history Decided when they are loaded BI analysts, through SQL and BI tools Orders, customers, products and deliveries, all years
Data mart A slice of the warehouse for one subject or team Built around one team's questions One department The operations mart: deliveries, warehouses and shifts

Why not report straight from the source system?

  • Load. Big analytical queries compete with customers for the same database.
  • History. The shop overwrites an order's status as it moves from "placed" to "delivered". A warehouse keeps the history, so you can ask how long each step took.
  • Integration. The shop database knows nothing about ad spend, courier scans or payroll. The warehouse brings them together with shared keys.

A lake is cheap and flexible: store now, decide the structure later. The price is that raw data is hard to use directly. A warehouse is the opposite: shaping takes work up front, and then everyone can trust and query it. Many cloud platforms now combine the two, and a typical cloud BI setup runs: sources → scheduled loads → lake and warehouse → transformations → shared measure definitions → dashboards.

The shortcut

Ask two questions of any data: raw or ready? Everyone or one team? Raw goes to the lake. Ready and shared goes to the warehouse. Ready and focused on one team's subject goes to a mart.

Placing Weftwise's dataStep 1 of 4
  1. Website click logs

    Two gigabytes of JSON a day, and nobody knows yet which fields matter. Raw: the lake.

Drills

Answer fast — trust the rule.

quick drill

Where should raw courier JSON files land first?

quick drill

Which is NOT a reason to keep reports off the shop's live database?

quick drill

What is a data mart?

quick drill

Which store shapes and cleans the data as it is loaded, so everyone can query it with confidence?

Remember

  • Lake keeps everything raw; warehouse keeps it clean; mart serves one team.
  • Raw or ready? Everyone or one team? The two answers place any data.
  • Trap: reporting straight from the live source system.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhere should the data live?

Explain to Meera why Ishaan should not build dashboards directly on the shop's live database, and where the website click logs, the cleaned orders table and the operations team's tables should live instead.