Project: retailer bronze to gold
Aster Supply regional revenue
The operations lead needs a repeatable bronze-to-gold report. The raw order feed includes pending, canceled, refunded and missing-amount records. Deliver a silver detail table with completed and refunded known amounts, plus a gold regional total with row counts. Preserve bronze and make the output traceable by order id.
Aster Supply's operations lead needs regional revenue that can be traced to individual orders. Build a silver table from the raw feed, classify the records that can enter the report and publish a gold summary. Keep the raw source unchanged.
Each step continues from your previous table state. The table names are deliberately explicit so another notebook can read the output without depending on a Python variable. You will remove canceled and pending records from the published measure, retain refunds, and leave unknown amounts out of the clean monetary feed. The final deliverable has a detail table, a regional total and an order-count check. An aggregate that looks right after dropping an entire region is still wrong, so inspect both the included rows and the resulting grain.
CREATE TABLE main.silver.retail_orders USING DELTA AS SELECT id,customer_id,amount,status,region FROM main.bronze.orders;
The initial silver copy retains all source rows so later quality decisions remain explicit.