Shrunken Dimensions
A shrunken dimension (or shrunken rollup dimension) is a subset of a conformed dimension. It contains either a subset of the attributes (columns) or a subset of the rows (for a higher grain) from the base dimension.
Shrunken dimensions are used when a fact table captures data at a higher level of aggregation than the atomic base dimension.
Example (A Shrunken Date Dimension):
If a forecasting fact table is built at the monthly grain, it cannot join to a standard daily dim_date table. Instead, it joins to a shrunken dim_month dimension, which drops the day-level attributes and retains only one row per month.
Base Dimension (dim_date):
| date_key | full_date | day_of_week | month_name | quarter | year |
|---|---|---|---|---|---|
| 20240101 | 2024-01-01 | Monday | January | Q1 | 2024 |
| 20240102 | 2024-01-02 | Tuesday | January | Q1 | 2024 |
Shrunken Dimension (dim_month):
| month_key | month_name | quarter | year |
|---|---|---|---|
| 202401 | January | Q1 | 2024 |
| 202402 | February | Q1 | 2024 |
The dim_month dimension contains a subset of columns (attributes) and a subset of rows (higher grain) compared to the base dim_date.
