milestone 1/6 Bronze: inspect raw data before cleaning
Inspect incoming records before making cleaning decisions.
Warehouse and Reporting · Profile raw CRM/sales records, build Silver and Gold tables in the disposable lab, explore the fact table, and publish repeatable reporting logic.
approach
Bronze preserves source records for traceability. Profile missing keys, duplicates, dates, and type mismatches before writing cleaning rules. Do not silently erase rows without documenting why. These source rows are fictional, inspired by common CRM/catalog/sales issues.
worked-example.sql
SELECT TRIM(raw_id) AS customer_id,COUNT(*) AS versions FROM bronze_customers WHERE raw_id IS NOT NULL GROUP BY TRIM(raw_id) HAVING COUNT(*)>1;
data for this milestone
bronze_customers4 columns · 7 rows
| raw_idtext | nametext | countrytext | updated_attext |
|---|---|---|---|
| C001 | Alice | USA | 2025-01-01 |
| C001 | Alice Nguyen | US | 2025-01-05 |
| C002 | Ben | GB | 2025-01-02 |
| C003 | Cara | UK | 2025-01-03 |
| C004 | Dev | IND | 2025-01-04 |
showing 5 of 7 rows
bronze_sales6 columns · 13 rows
| row_idinteger · key | customer_idtext | product_idtext | quantitytext | salestext | order_datetext |
|---|---|---|---|---|---|
| 1 | C001 | P01 | 2 | 24 | 2025-01-01 |
| 2 | C002 | P03 | 1 | 80 | 2025-01-02 |
| 3 | C001 | P02 | 1 | 45 | 2025-01-15 |
| 4 | C003 | P04 | 2 | 240 | 2025-02-01 |
| 5 | C004 | P03 | 2 | 160 | 2025-02-05 |
showing 5 of 13 rows