Warehouse stock is written to the lakehouse once a day per SKU. The question the business asks is always "what was on hand on this date" — and answering it by replaying every movement since the beginning of time is what a snapshot fact exists to avoid.
on_hand is the level on that day, not the movement since the day beforedim_sku| sku_key | sku_code |
|---|---|
| 1 | AA-1 |
fact_inventory_daily| as_of | on_hand | sku_key |
|---|---|---|
| 2026-01-01 | 10 | 1 |
| 2026-01-02 | 7 | 1 |
| sku_code | on_hand |
|---|---|
| AA-1 | 7 |
dim_sku| sku_key | sku_code |
|---|---|
| 1 | AA-1 |
| 2 | BB-2 |
fact_inventory_daily| as_of | on_hand | sku_key |
|---|---|---|
| 2026-02-01 | 4 | 1 |
| 2026-02-01 | 6 | 2 |
| total_on_hand |
|---|
| 10 |
Community-reported interview topic. Not an official company question and no affiliation is implied.
Start with a table. Give it a grain, then the columns that belong at that grain.
Run against the public tests, or submit to score against all of them.