source · sources/Kimball — Declaring the Grain.md
Kimball — Declaring the Grain
Ralph Kimball's foundational Design Tip on grain — the canonical source behind One Fact Per Grain. Agent-fetched 2026-06-26.
Summary
Kimball argues that declaring the grain is the pivotal step in dimensional design. The grain specifies exactly what one fact-table row represents (e.g. "an individual line item on a customer's retail sales ticket"). It must be declared before choosing dimensions or facts, because "if the grain isn't clearly defined, the whole design rests on quicksand" — dimension discussions go in circles and "rogue facts that introduce application errors sneak into the design."
The binding rule: "the facts must be true to the grain." Facts that aren't — his example is "amount billed year-to-date" — "produce nonsensical, useless results" when reporting tools combine rows, and should be excluded from the fact table (computed in the application or placed in a different fact table). Kimball's memorable framing: "the grain declaration is like a contract!"
Key claims
- Grain = the meaning of a single fact-table row; declare it first.
- Facts must be true to the grain; untrue-to-grain facts corrupt aggregates and belong elsewhere — the canonical basis for "never widen a fact with attributes that don't share its key."
- The grain is a contract that binds all downstream design decisions.
Connections
- One Fact Per Grain — confirms the heuristic and supplies the "true to the grain" rule and the "rogue facts produce nonsensical results" failure mode.
- Data Contract — Kimball literally calls the grain declaration "like a contract!"; the grain is the modeling-layer contract, the data contract is the boundary/interface contract — two contracts that compose.
- Medallion Architecture — grain discipline is what the gold layer is supposed to embody.
Source
- Original: Ralph Kimball, Kimball Group Design Tip, 2003-03-01 (
source-urlabove); faithful capture insource-file.