π§± The 7 Core Components of a Data Warehouse
π§± Data Warehouse Components
Think of a Data Warehouse like a modern airport.
- Planes bring passengers from different cities (Data Sources)
- Arrivals hall processes and checks them (Staging + ETL)
- The terminal is the central hub (Data Warehouse)
- Different gates serve different destinations (Data Marts)
- Flight information screens show real-time info (Reporting Layer)
- The airport manual guides operations (Metadata Layer)
1οΈβ£ Data Sources
The starting point β where all raw data comes from before entering the warehouse.
| Source Type | Examples |
|---|---|
| Relational databases | MySQL, Oracle, SQL Server (OLTP systems) |
| Flat files | CSV, Excel, JSON, XML |
| APIs | REST APIs from third-party services |
| Streaming data | Kafka, IoT sensors, clickstream |
| Legacy systems | Mainframes, old ERP systems |
| SaaS applications | Salesforce, SAP, HubSpot |
Data sources are not cleaned or structured β they're raw. That's what the next layers handle.
2οΈβ£ Staging Area
Like the arrivals lounge in an airport β passengers land here first before being processed. No one goes directly to the city.
The Staging Area is a temporary storage zone where raw data from sources is dumped before transformation. It acts as a buffer between sources and the warehouse.
What happens here:
- Raw data is extracted and stored as-is
- Basic validation checks run (file format, row counts)
- Data is held temporarily β cleared after ETL completes
- No transformation yet β just a landing pad
Source DB β [Extract] β Staging Area (raw tables) β [Transform] β DW
Staging area data is not used for reporting. It's intermediate. Never expose it to business users.
3οΈβ£ ETL Process
Extract β Transform β Load β the engine that moves data from staging into the warehouse.
| Step | What Happens |
|---|---|
| Extract | Pull data from source systems into staging |
| Transform | Clean, standardize, deduplicate, apply business rules |
| Load | Push the transformed data into the DW |
Example:
Extract β Pull sales records from 5 regional databases
Transform β Standardize currency to INR, remove duplicates, fill nulls
Load β Insert into the central Sales fact table in DW
ETL is covered in depth in upcoming topic. Think of it here as the pipeline that feeds the warehouse.
4οΈβ£ Data Warehouse (Core)
The central repository β the heart of the system. This is where clean, integrated, historical data lives.
Characteristics (recap):
- Subject-oriented, Integrated, Time-variant, Non-volatile
- Optimized for read-heavy analytical queries
- Uses Star or Snowflake schema (covered in Schemas & Relationships)
- Contains Fact tables (measures) and Dimension tables (context)
DW Structure:
βββ Sales Fact Table (revenue, quantity, discount)
βββ Customer Dimension (name, city, segment)
βββ Product Dimension (name, category, price)
βββ Date Dimension (day, month, quarter, year)
This is what analysts actually query β everything upstream exists to feed this layer.
5οΈβ£ Data Marts
If the DW is a supermarket, a Data Mart is a specialty store β only Electronics, or only Groceries. Smaller, faster, department-specific.
A Data Mart is a subset of the Data Warehouse scoped to a specific business department or function.
| Data Mart | Who Uses It | What It Contains |
|---|---|---|
| Sales Mart | Sales team | Revenue, deals, targets |
| Finance Mart | Finance team | P&L, budgets, costs |
| HR Mart | HR team | Headcount, attrition, payroll |
| Marketing Mart | Marketing team | Campaigns, leads, conversions |
Types:
- Dependent β built from the central DW (recommended)
- Independent β built directly from source systems (creates silos β avoid)
Independent data marts recreate the same problem DW was built to solve β inconsistent data per department.
6οΈβ£ OLAP / Reporting Layer
The presentation layer β where business users interact with the data.
What lives here:
- OLAP cubes β pre-aggregated, multi-dimensional data structures for fast slicing and dicing
- BI Tools β Power BI, Tableau, Qlik, Looker
- Reports & Dashboards β scheduled reports, self-service analytics
Analyst query flow:
BI Tool β OLAP Layer β DW / Data Mart β Result in seconds
OLAP cubes pre-compute aggregations (SUM, AVG, COUNT) so dashboards load instantly instead of recalculating each time.
7οΈβ£ Metadata Layer
Like the airport operations manual β the actual passengers don't read it, but it governs how everything runs. Without it, nothing works correctly.
Metadata is data about data. The metadata layer describes everything inside the warehouse β structure, lineage, definitions, and rules.
Types of Metadata:
| Type | Description | Example |
|---|---|---|
| Technical | Schema, data types, table structures | sales_fact has columns amount DECIMAL(10,2) |
| Business | Definitions business users understand | "revenue" = net sales after discounts |
| Operational | ETL logs, load timestamps, job status | Last loaded: 2024-06-20 02:00 AM |
Metadata answers: "Where did this data come from? What does it mean? When was it last updated?" β critical for trust and governance.
πΊοΈ Full Architecture Flow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA SOURCES β
β (OLTP DBs, Files, APIs, SaaS, Streaming) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β Extract
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β STAGING AREA β
β (Temporary raw data landing zone) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β Transform + Load (ETL)
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β DATA WAREHOUSE (Core) β
β (Fact tables + Dimension tables, historical) β
ββββββββββββ¬βββββββββββββββββββββββββββ¬ββββββββββββββββ
β Subset β Metadata
ββββββββββββΌβββββββββββ βββββββββββββΌββββββββββββββββ
β DATA MARTS β β METADATA LAYER β
β (Dept-specific DW) β β (Definitions, Lineage) β
ββββββββββββ¬βββββββββββ βββββββββββββββββββββββββββββ
β Query
ββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββ
β OLAP / REPORTING LAYER β
β (Power BI, Tableau, OLAP Cubes, Reports) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π§ͺ Practice Drill
// Try answering these:
// Q1. Name all 7 components of a Data Warehouse architecture in order from source to reporting.
// Q2. What is the purpose of the Staging Area? Why is it separate from the DW?
// Q3. A company has a DW. The Sales team wants a faster, smaller database with only sales data. What should they use and what type should it be?
// Q4. What's the difference between a Dependent and an Independent Data Mart? Which is preferred and why?
// Q5. Match each metadata type to its example:
// | Example | Metadata Type |
// |---|---|
// | `employee_id` is an `INT NOT NULL` column | ? |
// | ETL job ran at 3:00 AM and loaded 50,000 rows | ? |
// | "Revenue" means total sales minus returns | ? |
π‘ Click for Solutions
A1. Data Sources β Staging Area β ETL Process β Data Warehouse β Data Marts β OLAP/Reporting Layer β Metadata Layer
A2.
- Staging is a temporary buffer where raw data lands before being transformed
- It's separate from the DW to isolate dirty/raw data from clean analytical data
- It also protects source systems β data is extracted once into staging, not queried repeatedly
A3.
- Use a Data Mart (Sales Mart)
- It should be Dependent β sourced from the central DW to ensure consistent, trusted data
A4.
- Dependent β built from the central DW; inherits cleaned, standardized data β
- Independent β built directly from source systems; creates data silos and inconsistency β
- Dependent is preferred β it maintains a single source of truth
A5.
| Example | Metadata Type |
|---|---|
employee_id is an INT NOT NULL column | Technical |
| ETL job ran at 3:00 AM and loaded 50,000 rows | Operational |
| "Revenue" means total sales minus returns | Business |
β Previous Topic | Next Topic β Next Topic