Walmart M5 Data Platform Step 6 report · Databricks Gold
Step 06 · Complete

Gold layer: star schema + BI aggregates

Gold publishes business-ready dimensions, facts, and aggregate tables for retail / demand-planning analytics. Notebooks 0507 all completed successfully after fixing an ambiguous state_id join in facts.

Notebooks 05–07 finished Schema: walmart_m5_gold 12 Gold tables
Dimensions
3
date · product · store
Facts
2
daily sales · prices
Aggregates
7
BI marts
fact_daily_sales
59.2M
79.2% priced

Star schema

dim_date
dim_product
fact_daily_sales
dim_store
fact_product_prices
sales_value = quantity * sell_price
snap_flag   = SNAP day for the store's state (CA/TX/WI)
event_flag  = calendar event day

05 — Dimensions

TableRowsKeyNotes
dim_date1,969date_key (yyyyMMdd)events + SNAP attributes
dim_product3,049product_keyitem / dept / category
dim_store10store_keystore + state

06 — Facts

TableRowsGrainQuality
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.

07 — Aggregations (Power BI ready)

TableRowsPurpose
agg_daily_store_sales19,410Store performance by day
agg_daily_category_sales5,823Category mix by day
agg_store_category_sales30Store × category contribution / share
agg_product_performance3,049SKU ranking, velocity, volatility
agg_demand_trends1,941Daily demand + rolling 7d / 28d
agg_price_analysis7Price distribution by category/dept
agg_event_sales6Event vs non-event sales

Run order (Databricks)

01_bronze_ingestion
02_silver_sales
03_silver_products
04_silver_calendar
05_gold_dimensions
06_gold_facts
07_gold_aggregations

What’s next