Project · Retail sales warehouse
One warehouse for sales, suppliers and departments
The problem
Sales, seller and product data sit in separate exports, so every report starts by cleaning the same exports again, and teams reach different totals.
The solution
A pipeline that loads every order, item, seller and review into a six-layer warehouse: dbt cleans the data, applies the late rules and builds the star schema that feeds a Power BI sales, supplier and late-delivery report.
How it works
- Collect: Orders, items, sellers and reviews loaded as-is into Bronze
- Clean: dbt Silver models set types, tidy names, keep one review per order
- Rules: Gold flags late orders and ranks sellers by late items
- Model: Semantic: a star of order facts with product, seller, customer and date
- Report: Power BI sales, supplier and late-delivery pages
A closer look


The code
ranked = sellers.sort_values("late_rank").reset_index(drop=True)
cum = ranked.late_items.cumsum() / ranked.late_items.sum()
share = numbers["top sellers: share of late items"] * 100
fig, ax = plt.subplots(figsize=(8, 3.6))
ax.plot(range(1, len(cum) + 1), cum * 100, color=ACCENT, lw=2)
ax.axvline(TOP_N, color=GREY, ls="--", lw=1)
ax.set_xlabel("Sellers, most late items first")
ax.set_ylabel("Share of all late items (%)")The impact
- One star schema for sales, suppliers, products and departments.
- The 100 suppliers to call first: 41.6% of items, half of the late ones.
- Power BI pages on one trusted model.
The result
99,441 orders in one star schema: 100 of 3,095 sellers account for half of all late-delivered items.