GuideBeginner

Data Modeling For Analytics

Picks up the flat model — one fact and two dimensions — that `data-engineering-foundations-guide` deliberately left incomplete and takes it to real dimensional modeling, on the same Kiosko case. You learn Kimball's four-step process (business process, grain, dimensions, facts), how to decide with real criteria between a star schema, a snowflake schema, and a wide One Big Table by comparing join cost with `EXPLAIN`, how to historize a changing dimension with SCD type 1 and type 2 using `MERGE INTO`, how to join facts with historical dimensions at the exact point in time (the most expensive mistake in a dimensional model), how to deduplicate repeated rows with `ROW_NUMBER()`/`QUALIFY`, and how to build cumulative patterns: Kimball's accumulating snapshot for a session funnel and Zach Wilson's cumulative table design with array-type columns. Everything runs as SQL executed directly against DuckDB, with Python as minimal glue code. It closes with a capstone that integrates a complete Kiosko analytics warehouse: a star with a historized dimension, an accumulating snapshot, cumulative activity, and a wide table for the BI team.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Apply Kimball's four-step process and formally declare the grain of an existing fact table
  • Build a complete star schema with surrogate keys, a conformed calendar dimension (`dim_date`), and a bus matrix map
  • Compare star schema, snowflake, and One Big Table with `EXPLAIN`, measuring join cost against size and repeated columns
  • Implement SCD type 1 and type 2 with `MERGE INTO`, deciding per column when to historize and when to overwrite
  • Write the correct point-in-time join (`BETWEEN valid_from AND valid_to`) and explain why joining on the natural key alone corrupts historical revenue
  • Deduplicate repeated rows from a source with `ROW_NUMBER()`/`QUALIFY` and detect changes with anti-joins
  • Model an accumulating snapshot fact table for a session funnel, and a cumulative table design with array-type columns and 7- and 30-day rolling windows
  • Formalize degenerate dimensions and junk dimensions, and validate schema contracts between bronze, silver, and gold across a domain with more than one fact

Before you start

What you need to bring

It's for you if...

  • Anyone who already completed `data-engineering-foundations-guide` (or has an equivalent flat fact-and-dimension model) and needs to bring it to a real analytics warehouse
  • Analytics engineers and data engineers designing dimensional models for BI who need to justify star vs. snowflake vs. OBT with real criteria
  • Devs who already implemented SCD without understanding why their historical join returned wrong numbers
  • Anyone preparing for interviews that ask about dimensional modeling, SCD type 2, or accumulating snapshots

Requirements and materials

  • `data-engineering-foundations-guide` completed (or equivalent: a working flat fact-and-dimension model, with basic Python and SQL)
  • Intermediate SQL: `SELECT`, `JOIN`, `GROUP BY`
  • A personal laptop with Python 3 and DuckDB installable (`pip install duckdb`) — everything runs locally at $0

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!