Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is a junk dimension?

Data modeling · Extra High-Value

What is a junk dimension?

Mediummodel-28
junk dimensionflagslow cardinality

Question

What is a junk dimension?

Solution

A junk dimension packs many small, low-cardinality flags and indicators into one dimension table instead of creating dozens of tiny dims or leaving clutter on the fact.

Examples of flags: is_gift, is_mobile_order, payment_method, coupon_used_flag, channel_type.

dim_order_flags (junk)
  order_flags_sk
  is_gift
  is_mobile
  payment_method
  has_coupon

fct_orders
  ...
  order_flags_sk

Why use it

  • Keeps the fact narrow (one key instead of 10 flag columns)
  • Avoids a swarm of one-attribute dimensions
  • Combinations of flags are usually a manageable cartesian set

Caution

If attributes are high cardinality or independently huge, junk dims explode. Keep junk for true low-cardinality misc flags.

Interview tip

> "Junk dimension = miscellaneous flags bundled into one dim to declutter the fact."

PreviousNext