Loading lesson...
Wrong grain = wrong numbers; fan traps multiply your metrics silently
Wrong grain = wrong numbers; fan traps multiply your metrics silently
Topics covered: "What Is the Grain of This Table?", Defining Grain: One Row Represents What?, The Fan Trap: Joins That Inflate Metrics, The Chasm Trap: Missing Relationships, Grain as a Communication Tool
Grain is not a modeling step. It is THE modeling step. Everything else follows from it: which columns belong in the table, which joins are valid, which aggregations produce correct numbers. Getting grain wrong does not produce an error message. It produces wrong numbers that look right. That is why interviewers test it. What They're Really Testing The 60-Second Framework Step 3 is the strong-hire signal. Asking the interviewer a clarifying question about grain shows you have been burned by wrong
Your grain statement answer: 'The grain is a contract. Every row represents exactly one instance of X. If I can write a GROUP BY on the grain columns and get COUNT(*) > 1 for any group, the grain is violated.' Say this, then immediately write the validation query. The interviewer is checking whether you can enforce grain, not just define it. How Interviewers Grade Your Grain Statement Watch the progression from vague to interview-grade: The jump from 'good' to 'strong hire' is acknowledging that
Your fan trap answer: 'A fan trap happens when I join two facts through a shared dimension and one side has multiple rows per key. The join fans out, duplicating the other side. My SUM now counts revenue 3x because each order was duplicated once per shipment. No error message, no warning, just wrong numbers that look plausible.' Say 'no error message' explicitly. That is what makes fan traps dangerous and why interviewers test them. The Tell: Words That Signal This Pattern The Scenario the Inter
Your chasm trap answer: 'A chasm trap is the inverse. Instead of too many rows, I get too few. An INNER JOIN through a sparse dimension silently drops entities that exist on only one side. Bob has orders but no shipments. The INNER JOIN drops Bob entirely. My total orders metric just lost 70% of its value.' Pair this with the fan trap to show you check for both. The Tell: Words That Signal This Pattern The Scenario the Interviewer Will Draw on the Whiteboard Set up the scenario for the interview
Everything in this lesson so far has been about grain as a technical concept. This section is about grain as a communication strategy. In an interview, the way you talk about grain determines your level. Junior candidates treat grain as a checkbox. Senior candidates use it as the anchor for every subsequent design decision. The Bridge Move Red Flag Phrases to Avoid Vocabulary That Signals Seniority The Closing Move At the end of any modeling question, circle back to grain. 'So to summarize: the