A question that shows up after the tables are built

Nine months into a project, someone asks for revenue by hour of day, split by the channel that first acquired the customer. The fact table can answer by day, and it can answer by channel, but the two never meet at the grain this question needs. No join puts the hour back, because the hour was never recorded. This is the ordinary way a dimensional model fails. The damage is done when a row is defined, well before anyone writes a query against it.

Kimball told the same story from the teaching side. Reviewing student designs, he kept meeting the same opening mistake: columns were chosen before the grain was declared, or no declaration was made at all. Grain is the claim about what one fact row represents. It eventually matches the primary key, but writing it out as a list of dimension keys is precisely the error he was flagging. The declaration goes into business language first. One row is one billing line item, one refund, one reading taken at a stated instant. Only once that sentence is fixed do dimensions and facts get their places.

Why the smallest row wins

Kimball walked through a doctor's billing statement, where a single line item can carry roughly ten dimensions. That number is not a target to copy. It is a consequence of atomic measurement: the more precisely a thing is measured, the more becomes known about it, and the more dimensions become available to constrain and group it. Aggregation throws dimensions away. A daily total cannot later be sliced by the hour it swallowed.

Atomic grain is therefore a bet on questions nobody has asked yet. A team that records each line item keeps the option of rolling upward; a team that records only the roll-up has discarded the detail any reverse cut would need. Pre-aggregated data still has a role, sitting beside the atomic facts. The cost is storage and a longer path to common answers, and that trade is worth naming out loud rather than hiding.

Facts have to obey the row

A fact that cannot be true of one row does not belong on that row. The billing line item can hold the amount of that line. The cumulative amount billed to the patient since the start of the year cannot, because it describes many lines at once. Kimball's instruction is to remove such a measure from the design and compute it in the application layer instead. Combining facts of mismatched grain produces figures that look exact and mean nothing.

This is the part a foreign-key list misses. Grain is a rule about the business process, and the rule decides which facts are legal. Dimensions are deduced from it.

History changes, and SCD types say how

Dimensions drift. A customer moves, a product gets reclassified, a channel is renamed. Slowly changing dimensions, a term Kimball introduced in the mid-1990s, are the family of answers to that drift. The three core types are easy to state and easy to confuse.

SCD approachWhat the table recordsShape of the change
type 1The old value is overwrittenNo history kept
type 2A new row is addedFull history, with a validity window
type 3A new column is addedA limited before-and-after view
type 0The original value is retainedNothing changes after insert
type 4A separate mini-dimension holds the volatile attributesFast-changing fields split off
type 5, 6, 7Hybrid combinations of the earlier typesCurrent and historical values both reachable

The common error is writing type 2 as adding a column. Adding a column is type 3; adding a row is type 2. The extended members, type 0, type 4, type 5, type 6 and type 7, were unified under one numbering scheme in 2013, alongside the third edition of the Toolkit. Reducing the family to three types quietly discards half the toolkit.

Verbs, nouns, and a boundary that moves

dbt's dimensional modeling guide offers a memorable shorthand: a fact resembles a verb, an event or outcome in a process; a dimension resembles a noun, the who or what involved. It is a teaching analogy, offered to make a distinction stick. The same guide says a given entity can serve as a fact in one analysis and as a dimension in another, and that the answer depends on the question. Fact tables accumulate history by appending rows, while dimension attributes are usually overwritten in place. That contrast is a useful default. It stops short of being a classifier that survives every case.

Stars, snowflakes, and the wide-table option

A star schema puts one fact table at the center, surrounded by dimension tables. A snowflake normalizes those dimensions further, linking dimension to dimension. dbt notes that cheap cloud storage and computation as the main cost driver have made a third shape competitive: a wide table that joins facts and dimensions in advance. Which one wins depends on whether the consumers downstream are comfortable with joins. No single shape serves every workload, and claims that one beats another by a fixed margin have no backing here. The grain declaration survives all three choices unchanged.

Integrate first, or marts first

A TDWI overview frames a long-running argument between two camps. One route builds a centralized, highly normalized enterprise data warehouse, the EDW, first and derives data marts from it, organized by subject. The other builds star-schema marts process by process and ties them together with conformed dimensions. The disagreement concerns sequence and where integration happens. Both camps accept that marts and normalization have their place, and most large warehouses end up blending the two. That overview is a secondary summary with no author shown on the page, so the terms belong to the summary. Neither named figure is quoted directly here.

The discipline beneath both camps is the same sentence: state the grain, in business terms, before drawing the tables. Cloud pricing changes the shape of the tables. It does not change that order.

What a team takes away

Pick the business process. Say what one row means. Keep it as atomic as the source allows, attach only facts that hold for that row, and record enough dimension history that older questions can still be asked. The hourly question will arrive eventually. A team holding line-item grain answers it with a query; a team holding daily totals answers it with an apology. Cross Mini App teams work over a shared runtime and an open catalog, yet no model there substitutes for writing the grain down first.

Sources