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.
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.
Where should raw courier JSON files land first?
Which is NOT a reason to keep reports off the shop's live database?
What is a data mart?
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.
