Dimensions
3
date · product · store
Gold publishes business-ready dimensions, facts, and aggregate tables for
retail / demand-planning analytics. Notebooks 05–07
all completed successfully after fixing an ambiguous state_id
join in facts.
sales_value = quantity * sell_price snap_flag = SNAP day for the store's state (CA/TX/WI) event_flag = calendar event day
| Table | Rows | Key | Notes |
|---|---|---|---|
dim_date | 1,969 | date_key (yyyyMMdd) | events + SNAP attributes |
dim_product | 3,049 | product_key | item / dept / category |
dim_store | 10 | store_key | store + state |
| Table | Rows | Grain | Quality |
|---|---|---|---|
fact_product_prices |
6,841,121 | store × item × wm_yr_wk | written OK |
fact_daily_sales |
59,181,090 | date × product × store | 0 null keys · 0 duplicate grain · 79.2% rows have price |
First run failed with AMBIGUOUS_REFERENCE state_id after joining
dim_store. Fixed by joining only store_key/store_id
and keeping state_id from sales. Re-run succeeded.
| Table | Rows | Purpose |
|---|---|---|
agg_daily_store_sales | 19,410 | Store performance by day |
agg_daily_category_sales | 5,823 | Category mix by day |
agg_store_category_sales | 30 | Store × category contribution / share |
agg_product_performance | 3,049 | SKU ranking, velocity, volatility |
agg_demand_trends | 1,941 | Daily demand + rolling 7d / 28d |
agg_price_analysis | 7 | Price distribution by category/dept |
agg_event_sales | 6 | Event vs non-event sales |
01_bronze_ingestion 02_silver_sales 03_silver_products 04_silver_calendar 05_gold_dimensions 06_gold_facts 07_gold_aggregations