Demographic mini-dimension
Model high-churn demographic buckets as a mini-dimension linked through a profile snapshot fact.
Concept
slowly-changing-dimensions
The primary modeling idea this problem reinforces.
Requirements
4
Business needs the model must satisfy.
A lifecycle marketing team updates customer age bucket, income bucket, and household segment monthly from enrichment vendors. They need to analyze campaigns by the bucket assignment that was active in a given month without creating a new base customer row for every enrichment update.
Mini-dimensions keep volatile profile buckets analyzable without bloating the base customer dimension. The model still needs a time-bound assignment grain so historical campaign analysis is reproducible.
- Add a demographic mini-dimension with its own surrogate key.
- Include age and income bucket attributes in the mini-dimension.
- Add a profile snapshot fact with a snapshot date.
- Connect the profile snapshot fact to both customer and demographic surrogate keys.
Template
Demographic mini-dimension starter workspace
The model users start from in the full workspace.
Entities
1
Seeded tables visible in the public preview.
Dialect
postgresql
Generated SQL target for this starter model.
This preview is read-only. Open the workspace to edit and verify; saving needs a free account.
Open workspaceTry the question first.
The discussion has other people's approaches and solutions. Give it a real attempt before you read them.