Raw food-delivery exports are notoriously inconsistent: currency text mixed with serving-size labels ("₹200 FOR TWO"), sentinel strings ("--", "Too Few Ratings", "license"), approximate count buckets ("50+ ratings", "1K+ ratings"), and quoted headers with spaces. Zomato ETL Warehouse models 35.1 million raw rows into a clean Bronze → Silver → Star-Schema Mart + SCD Type-2 warehouse using dbt-core 1.12.7 and DuckDB 2.0.1 running entirely locally.
Medallion & Star-Schema Layout
Bronze main.* (7 raw tables, 35.1M rows) → Silver silver.* (7 typed & cleaned views) → Star Schema mart.* (7 dimensions + 3 facts) → Gold & Business Marts (gold.gold_daily_sales, mart_daily_city_revenue, mart_restaurant_performance, mart_delivery_sla) + snapshot.zomato_snapshot (SCD Type-2) = 22 dbt models & snapshots
| Table | Rows | Role in Warehouse |
|---|---|---|
| order_items | 22,998,179 | Line-item fact table grain (fact_order_items) |
| orders | 10,000,000 | 30-month order stream (2024-01-01 to 2026-06-30; 0 orphan restaurant joins) |
| menu | 1,179,936 | Restaurant-to-dish pricing catalog (all-VARCHAR raw source) |
| food | 371,561 | Dish catalog (270,776 Veg · 100,784 Non-veg · 1 blank) |
| reviews | 300,000 | Order review fact table (fact_reviews) |
| restaurant | 148,541 | Restaurant dimension + SCD Type-2 tracked entity |
| users | 100,000 | User dimension with parsed income min/max bounds |
Silver-Layer Data Cleaning Rules
Every transformation stays readable and deterministic in SQL views so raw Bronze tables remain immutable and auditable:
silver_restaurant: Nulled87,014"--"ratings and87,014"Too Few Ratings"placeholders, parsed61,441lower-bound approximate count strings (50+/1K+), stripped currency symbols from cost-for-two (131nulls preserved), and nulled12,861literal"license"placeholder strings.silver_menu: Applied regex extraction andtry_castover an all-VARCHAR source — parsing all1,179,936rows with0null prices while flagging1,193rows withprice_is_for_two = true.silver_users&silver_food: Normalised quoted headers with spaces to snake_case, extracted numericmonthly_income_min/monthly_income_maxbounds from bracket text, and cast vegetarian flags to typed booleans.
Marts, SCD Type-2 & Observed Local Build Times
| Model / Run | Output Rows | Observed Duration | What It Computes |
|---|---|---|---|
| 19-model full run (Silver + Star + daily revenue) | 35M+ scanned | ~10.4 s | 7 Silver views, 7 dims, 3 facts (fact_orders 2.4–4.4 s, fact_order_items 3.9–4.3 s), gold_daily_sales, mart_daily_city_revenue (0.99 s) |
| mart_restaurant_performance | 148,541 | 1.19 s | Delivered revenue, gross sales, avg rating, and avg delivery minutes per restaurant |
| mart_delivery_sla | 4,416,240 | 16.01 s | Exact p50 and p90 quantile_cont delivery minutes grouped by date × 821 cities × hour over 9.15M delivered rows |
| zomato_snapshot (SCD Type 2) | 148,541 | 0.94 s | strategy='check' tracking name, city, rating, rating_count, cost, and cuisine changes |
Read next: Web Research Engine and The Churn Cliff (data report).