Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 44/ 160
03. Data Warehousing & Data Modeling

Dimensional Modeling Fundamentals (Kimball Methodology)

Design analytics-friendly models around business processes using Kimball dimensional techniques.

IntermediateKimball · Bus Matrix · Grain3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

A measurable business event or snapshot. Next, exact row meaning and event multiplicity. Finally, shared keys, definitions, additivity, and lineage.

Think of it like…

Dimensional modeling is urban planning: the bus matrix names which routes serve each neighborhood, facts record trips, and dimensions are the shared maps used by every line.

Where you’ve seen it

For fact_order_lines, declare 'one row per finalized order line per correction version'; conformed date, product, and customer dimensions let sales and returns share the same filters.

Words you’ll hear

Kimball
A dimensional design method organized around business processes, grains, fact tables, and reusable conformed dimensions.
Bus Matrix
A matrix linking fact processes to dimensions and showing where business definitions must align across marts.
Grain
The exact semantic event or snapshot represented by one row in a fact table.
Operational boundary
Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts. Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

Visual diagram

Loading interactive diagram

Theory & deep dive

Kimball: the working mechanism

Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix.

A measurable business event or snapshot. Exact row meaning and event multiplicity, then who, what, when, where, and how context; this exposes the state governed by Grain.

Dimensional Modeling Fundamentals in one concrete design

For fact_order_lines, declare 'one row per finalized order line per correction version'; conformed date, product, and customer dimensions let sales and returns share the same filters.

Key takeaway: Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix

Dimensional Modeling Fundamentals: failure mode and production response

Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.

Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity. Track Rows per grain as "one for the stated business key and version", and make Conformed dimensions visible to the dataset owner.

Key takeaway: Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

How it works, step by step

Step 1 of 4
Kimball

1. Select process

A measurable business event or snapshot. Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix.

a measurable business event or snapshot
Key numbers at this step
Rows per grain
one for the stated business key and version
Bus Matrix
A matrix linking fact processes to dimensions and showing where business definitions must align across marts.

When to use it & trade-offs

What it is

Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix. For fact_order_lines, declare 'one row per finalized order line per correction version'; conformed date, product, and customer dimensions let sales and returns share the same filters.

Why it matters: Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts. Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

When to reach for it

  • Design analytics-friendly models around business processes using Kimball dimensional techniques.
  • Choose Kimball because it provides this capability: A dimensional design method organized around business processes, grains, fact tables, and reusable conformed dimensions.
  • Keep evidence for Rows per grain at "one for the stated business key and version" so the last production stage-Conform and test - shared keys, definitions, additivity, and lineage-remains testable.

When to avoid or be careful

  • Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.
  • Do not conflate Bus Matrix with Kimball. The second concept contributes different behavior: A matrix linking fact processes to dimensions and showing where business definitions must align across marts.
  • Release only after this guardrail is in place: Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

Kimball / Bus Matrix / Grain - roles, limits, and operating cost

Kimball
Best for: A dimensional design method organized around business processes, grains, fact tables, and reusable conformed dimensions.

Strengths: A dimensional design method organized around business processes, grains, fact tables, and reusable conformed dimensions. Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix.

Watch out: Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.

Bus Matrix
Best for: A matrix linking fact processes to dimensions and showing where business definitions must align across marts.

Strengths: A matrix linking fact processes to dimensions and showing where business definitions must align across marts. In this workflow it supports: Choose dimensions - who, what, when, where, and how context.

Watch out: The operating cost is real: shared key and attribute definition across fact processes.

Grain
Best for: The exact semantic event or snapshot represented by one row in a fact table.

Strengths: The exact semantic event or snapshot represented by one row in a fact table. Its output can be checked with Additivity.

Watch out: Operating guardrail: Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for Kimball, and how would Rows per grain reveal it?”
  • “Why is Bus Matrix distinct from this behavior: the exact semantic event or snapshot represented by one row in a fact table?”
  • Production clue: Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.
  • Design probe: Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

Benchmarks & rules of thumb

Rows per grain -
one for the stated business key and version
Conformed dimensions -
shared key and attribute definition across fact processes
Additivity -
whether a measure can be summed across every dimension

Common mistakes & follow-ups

Common interview mistakes

  • Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.
  • Reporting success from a job exit code without checking Rows per grain and Conformed dimensions.
  • Treating this example as complete without replay, rollback, or access boundaries: For fact_order_lines, declare 'one row per finalized order line per correction version'; conformed date, product, and customer dimensions let sales and returns share the same filters.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: A dimensional design method organized around business processes, grains, fact tables, and reusable conformed dimensions.
  • What does the recovery plan do when this occurs? Starting from available source tables rather than business grain creates mixed event types, duplicate customer definitions, and metrics that cannot be compared across marts.
  • When is Kimball insufficient for Conformed dimensions, and what does adding Bus Matrix cost in Rows per grain?
Interview tip: Lead with the data path and failure boundary: Kimball modeling declares a business process, its event grain, dimensions for filtering context, and facts for additive measures, then aligns them through a shared bus matrix. Then make the answer operational: Write one-grain sentences, publish a bus matrix mapping business processes to conformed dimensions, choose surrogate keys and SCD policy, and build tests for grain, referential integrity, and measure additivity.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Dimensional Modeling Fundamentals (Kimball Methodology) with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Normalization (1NF, 2NF, 3NF) vs Denormalization for Analytics
Next topic
Fact Tables (Transaction, Periodic Snapshot, Accumulating Snapshot)