Skip to content
Back to challenges
SCD DepthConcept Challengeintermediate20 min

Demographic mini-dimension

Model high-churn demographic buckets as a mini-dimension linked through a profile snapshot fact.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

slowly-changing-dimensions

The primary modeling idea this problem reinforces.

Requirements

4

Business needs the model must satisfy.

Read the concept guide: Slowly changing dimensions: Type 2
Scenario

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.

Why this matters

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.

Requirements
  • 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.
Read-only starter workspace
Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

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.

Mini Map

This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

Open workspace

Try the question first.

The discussion has other people's approaches and solutions. Give it a real attempt before you read them.