offdataai
← All courses
offdataai Learn · Beginner

Dimensional modeling (Kimball)

Design star schemas the way analytics teams use them: grain, facts, dimensions, history and conformance.

Start learning for $1/month

8 lessons · about 110 minutes · included in Explorer

Beginner8 lessons · about 110 minutes

Dimensional modeling (Kimball)

Design star schemas the way analytics teams use them: grain, facts, dimensions, history and conformance.

Outcome: You can design a star schema for a business process and defend every choice in review.

  1. 1

    Declare the grain first

    Every fact table starts with one sentence: what does a single row mean?

    Build it in the Model Builder · 12 min · instant checks

  2. 2

    Split a flat table into facts and dimensions

    Turn a wide export into a star schema: measures in the fact, descriptions in dimensions.

    Build it in the Model Builder · 15 min · instant checks

  3. 3

    Keep history with a Type 2 dimension

    When a customer moves segment, should last year's sales move with them?

    Build it in the Model Builder · 12 min · instant checks

  4. 4

    Build a date dimension and role-play it

    Replace raw dates with a calendar everyone shares, then use it twice on one fact.

    Build it in the Model Builder · 12 min · instant checks

  5. 5

    Conform dimensions across facts

    Two fact tables, one product dimension: the trick that makes cross-process reporting work.

    Build it in the Model Builder · 15 min · instant checks

  6. 6

    Factless facts and bridge tables

    Record events that have no measures, and attach many values of a dimension to one fact row without double counting.

    Build it in the Model Builder · 15 min · instant checks

  7. 7

    Periodic and accumulating snapshot facts

    Pick the right fact type for balances over time and for processes that move through milestones.

    Build it in the Model Builder · 15 min · instant checks

  8. 8

    Junk and degenerate dimensions

    Fold scattered low-cardinality flags into one junk dimension and keep transaction numbers on the fact.

    Build it in the Model Builder · 12 min · instant checks

What you will be able to do

  • ✓State a fact table's grain in one sentence
  • ✓Choose the most atomic grain the source supports
  • ✓Attach the right dimension keys and additive measures
  • ✓Tell a measure from a descriptive attribute
  • ✓Move descriptive attributes into dimensions
  • ✓Replace repeated text with a surrogate key
  • ✓Choose between overwriting (Type 1) and versioning (Type 2)
  • ✓Add the columns a Type 2 dimension needs
  • ✓Keep the surrogate key as the primary key and the business key as an attribute
  • ✓Explain why dates deserve a dimension
  • ✓Design the core columns of dim_date
  • ✓Reference one dimension in several roles from a fact
  • ✓Explain what makes a dimension conformed
  • ✓Reuse existing dimensions in a new fact
  • ✓Spot a duplicate dimension before it ships
  • ✓Recognise when a fact table needs no measures at all
  • ✓Resolve a multi-valued dimension with a bridge table
  • ✓Use a weighting factor so allocated totals still add up
  • ✓Tell transaction, periodic snapshot and accumulating snapshot facts apart
  • ✓Design an accumulating snapshot with one date key per milestone
  • ✓Store lag measures so durations are a sum, not a self-join
  • ✓Spot flags and codes that clutter a fact table
  • ✓Combine them into a junk dimension with one surrogate key
  • ✓Keep identifiers with no attributes as degenerate dimensions

Free reading on these topics

What Is Grain in Data Modeling? How to Declare It and Avoid Common Mistakes

Grain is the definition of what one row in a fact table represents. How to declare it, worked examples from e-commerce, SaaS, banking and healthcare, and the mistakes that break reports.

8 min read

Fact vs Dimension Tables: How to Tell Them Apart (With Examples)

Fact tables hold measurements, dimension tables hold context. How to classify columns and tables, the three types of fact table, additivity, and common modeling mistakes.

8 min read

Slowly Changing Dimensions Explained: SCD Types 0, 1, 2, 3 and 6 With SQL

A practical guide to slowly changing dimensions. Each SCD type explained with DDL, when to use it, a complete MERGE pattern for Type 2, and the mistakes that corrupt history.

8 min read

How to Build a Date Dimension (dim_date) in SQL, Plus Role-Playing Dates

A complete guide to the date dimension: which columns to include, generating dim_date in SQL for Snowflake, BigQuery, Postgres and Databricks, fiscal calendars, and role-playing dates.

8 min read

Conformed Dimensions and the Kimball Bus Matrix, With a Worked Example

How conformed dimensions let separate fact tables answer cross-process questions, and how to build a Kimball enterprise bus matrix step by step with an e-commerce example.

8 min read

Star Schema vs Snowflake Schema: Trade-offs on Modern Cloud Warehouses

Star and snowflake schemas compared with DDL, query examples and the trade-offs that actually matter on Snowflake, BigQuery, Databricks and Redshift today.

7 min read

Included in Explorer

Every course and every exercise for $1 a month.

Explorer also includes the Model Builder, all 174 templates and SQL for every warehouse. Cancel anytime.