Guide for designing and auditing Kimball-style dimensional models (star schemas, fact tables, dimension tables)...
Practitioner's guide for designing and auditing Kimball-style dimensional models.
Determine the task, then follow the appropriate path:
"Create a dimensional model" -> Follow the Four-Step Design Process
"What fact table pattern should I use?" -> See Fact Table Patterns
"How should I handle changing dimensions?" -> See SCD Reference
"Help me with special dimension patterns" -> See Dimensions Reference
"Audit my existing model" -> Use the Audit Checklist below, with detailed anti-patterns in Anti-Patterns Reference
"Plan an engagement end-to-end" -> See Engagement Playbook for Discovery -> Design -> Implementation -> Validation phases
dim_date, dim_customer, dim_product across all fact tables.| Object | Prefix | Example |
|---|---|---|
| Staging model | stg_ |
stg_nomos_orders |
| Intermediate model | int_ |
int_orders_enriched |
| Dimension table | dim_ |
dim_customer, dim_date |
| Fact table | fct_ |
fct_orders, fct_shipments |
| Mart / reporting table | mart_ |
mart_sales_summary |
| Surrogate key | _key suffix |
customer_key, date_key |
| Natural/business key | _id suffix |
customer_id, order_id |
| Date FK in fact | _date_key |
order_date_key, ship_date_key |
Quick checklist for reviewing existing models. See Anti-Patterns Reference for detailed explanations.
models/
├── staging/ -- stg_{source}_{entity}.sql (clean, rename, cast)
├── intermediate/ -- int_{entity}_{transform}.sql (business logic)
├── dimensions/ -- dim_{entity}.sql (conformed, shared)
├── facts/ -- fct_{process}.sql (one per business process)
└── marts/ -- mart_{domain}_{use_case}.sql (wide, denormalized)
Build order: staging -> dimensions -> facts -> marts.