Model business grain in the medallion layers
Relate star, snowflake and data vault design to validated and published analytics.
Model business grain in the medallion layers
Work through the decision
A ridership fact records one boarding per ticket leg. The finance table records one charge per entire ticket. Both have a ticket ID. Can an analyst directly attach every charge to every boarding and sum the result by station?
Check your reasoning
Write the fact grain before defining relationships. Joining two legs to one charge reproduces the charge twice. Choose an allocation rule with the business owner, or report each measure at its native grain. Put standardized entity keys in validated data and provide consumer-ready facts and dimensions in the presentation layer.
Compare the choices
- Star schema
- Surround a fact of declared grain with descriptive dimensions for common BI filters and aggregation.
- Snowflake schema
- Normalize parts of a dimension hierarchy into related tables. Evaluate whether the reuse and consistency justify extra joins.
- Data vault
- Represent business keys in hubs, relationships in links and descriptive history in satellites when integration and traceability matter.
- Medallion architecture
- Separate raw source capture, validated reconciliation and business-ready data products. Decide the appropriate model for each layer.
Test the decision
Use a star to simplify common fact-to-dimension access. Snowflaking a dimension normalizes a hierarchy at the price of extra joins. A data vault preserves source business keys, relationships and descriptive history. Bronze, silver and gold describe progressive refinement and can host different modeling techniques.
Practice the guide skills
- Model ticket sales with a station hierarchy and a changing source-system identifier. Watch 2:04:43 · Continue at 2:06:08 · Continue at 2:06:41
Check your answer
Use a star for a simple fact-to-dimension query, snowflake a dimension when normalized hierarchies justify added joins, and consider a data vault for historized business keys and relationships.
- Place raw events, validated records and report measures in a medallion design. Watch 2:08:01
Check your answer
Retain source history in bronze, reconcile identifiers and quality in silver, and publish dimensional facts or measures in gold. A star schema expresses analytical grain within a layer.
Official objectives for this lesson
Related lesson · Data models and processing
Model business grain in the medallion layers quiz
Answer 3 questions. Check each answer for an explanation.