All jobs / Data engineer / Data Warehousing
Data engineer interview question · 0–1 years
A fact table is queried by event_date. How do you store it?
The strongest answer
Partitioned (or clustered) on that date so a day filter can prune — I do not dump one giant unpartitioned heap “for simplicity”
Why it works
Exactly. Partition for the filter you run. Random and user-only partitions make a day scan a full read.
What a good answer covers
- Partition for the common filter.
- Date facts want a date partition.
- Do not one-file “for simplicity.”
- Random partitions do not prune a day.
Answers that fall short
- Close, but not the strongest: One file so it is simple
One file is a full scan forever. - Weak: Partitioned on user_id only, because users are unique
Unique is not the access path. - Red flag: Partitioned on a random uuid so files are even
Even files that you always read entirely still cost.
Who gets asked this
More Data Warehousing questions
- A cloud warehouse such as Snowflake or BigQuery does not rely on B-tree indexes on fact tables the way an…
- A teammate points the app’s primary key lookups at the warehouse. What do you say?
- Snowflake, BigQuery and Databricks all separate storage from compute. What does that actually buy a data team?
- A job’s bill doubled. bytes_scanned doubled. What do you inspect first?
- In an MPP warehouse where you choose how a table is distributed across nodes (Redshift, Synapse), how do you…
- When do you cluster / Z-order instead of adding another partition column?
- What most likely happened in the demo, and how do you benchmark honestly?
- Warehouse spend is everyone’s and no one’s. What do you install?