# afaqueahmad7117/databricks-masterclass architecture

> Architecture diagram of the GitHub repository afaqueahmad7117/databricks-masterclass, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/afaqueahmad7117/databricks-masterclass
- Repository: https://github.com/afaqueahmad7117/databricks-masterclass

## Overview

This repository is a Databricks learning project, with a restaurant analytics end-to-end example and Delta Lake notebooks. The example generates restaurant, customer, historical-order and review data, and can also stream generated orders through Azure Event Hubs into a bronze-to-gold pipeline. The sampled pipeline code shows order validation and transformation into silver facts, then customer, restaurant-review and sales gold views. Notebook filenames document additional Delta Lake topics. The root README gives no further architecture; unsampled ingestion and review-processing details are represented only where sampled code names them.

Main entry points: [`projects/databricks-e2e-project/00_synthetic_data/03_run.py`](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/03_run.py) (Generation runner), [`projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py) (Customer 360), [`projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py`](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py) (Bronze streaming orders), [`projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py`](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py) (Silver order facts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data_gen["Synthetic data"]
  node_master_data["Master data generator<br/>[00_sql_db.py]"]
  node_historical_gen["Historical orders"]
  node_review_gen["Review generator<br/>[02_reviews.py]"]
  node_generator_runner["Generation runner<br/>[03_run.py]"]
end

subgraph group_ingestion["Order ingestion"]
  node_eventhub_gen["Live order generator"]
  node_bronze_orders["Bronze streaming orders"]
end

subgraph group_transforms["Analytics pipeline"]
  node_bronze_sources[("Bronze reference data")]
  node_silver_orders["Silver order facts<br/>[fact_orders.py]"]
  node_silver_items["Silver item facts"]
  node_silver_reviews["Silver review facts"]
  node_gold_customer["Customer 360<br/>[d_customer_360.py]"]
  node_gold_reviews["Restaurant reviews"]
  node_gold_sales["Sales summary<br/>[d_sales_summary.py]"]
end

subgraph group_learning["Delta Lake learning"]
  node_delta_topics["Delta Lake tutorials"]
end

node_operator(("Project operator"))
node_eventhub["Azure Event Hubs"]

node_operator -->|"runs"| node_generator_runner
node_generator_runner -->|"invokes"| node_master_data
node_generator_runner -->|"invokes"| node_historical_gen
node_generator_runner -->|"invokes"| node_review_gen
node_historical_gen -->|"reads CSVs"| node_master_data
node_review_gen -->|"reads orders"| node_historical_gen
node_operator -.->|"runs"| node_eventhub_gen
node_eventhub_gen -->|"sends events"| node_eventhub
node_eventhub -->|"streams events"| node_bronze_orders
node_bronze_orders -->|"reads stream"| node_silver_orders
node_bronze_orders -->|"reads stream"| node_silver_items
node_silver_orders -->|"reads facts"| node_gold_sales
node_bronze_sources -->|"reads customers"| node_gold_customer
node_silver_orders -->|"reads facts"| node_gold_customer
node_silver_items -->|"reads facts"| node_gold_customer
node_silver_reviews -->|"reads facts"| node_gold_customer
node_bronze_sources -->|"reads restaurants"| node_gold_reviews
node_silver_reviews -->|"reads facts"| node_gold_reviews
node_operator -.->|"studies"| node_delta_topics

click node_master_data "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/00_sql_db.py"
click node_historical_gen "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/01_historical_orders.py"
click node_review_gen "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/02_reviews.py"
click node_generator_runner "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/03_run.py"
click node_eventhub_gen "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/04_eventhub_orders.py"
click node_bronze_orders "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py"
click node_bronze_sources "https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold"
click node_silver_orders "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py"
click node_silver_items "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_order_items.py"
click node_silver_reviews "https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver"
click node_gold_customer "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py"
click node_gold_reviews "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_restaurant_reviews.py"
click node_gold_sales "https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_sales_summary.py"
click node_delta_topics "https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/delta_lake"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_master_data,node_historical_gen,node_review_gen,node_generator_runner toneBlue
class node_eventhub_gen,node_bronze_orders toneAmber
class node_bronze_sources,node_silver_orders,node_silver_items,node_silver_reviews,node_gold_customer,node_gold_reviews,node_gold_sales toneMint
class node_delta_topics toneRose
class node_operator,node_eventhub toneIndigo
```

## Components

### Synthetic data

- [Master data generator](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/00_sql_db.py): `projects/databricks-e2e-project/00_synthetic_data/00_sql_db.py`
- [Historical orders](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/01_historical_orders.py): `projects/databricks-e2e-project/00_synthetic_data/01_historical_orders.py`
- [Review generator](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/02_reviews.py): `projects/databricks-e2e-project/00_synthetic_data/02_reviews.py`
- [Generation runner](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/03_run.py): `projects/databricks-e2e-project/00_synthetic_data/03_run.py`

### Order ingestion

- [Live order generator](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/00_synthetic_data/04_eventhub_orders.py): `projects/databricks-e2e-project/00_synthetic_data/04_eventhub_orders.py`
- [Bronze streaming orders](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py): `projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py`

### Analytics pipeline

- [Bronze reference data](https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold`
- [Silver order facts](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py`
- [Silver item facts](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_order_items.py): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_order_items.py`
- [Silver review facts](https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver`
- [Customer 360](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`
- [Restaurant reviews](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_restaurant_reviews.py): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_restaurant_reviews.py`
- [Sales summary](https://github.com/afaqueahmad7117/databricks-masterclass/blob/main/projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_sales_summary.py): `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_sales_summary.py`

### Delta Lake learning

- [Delta Lake tutorials](https://github.com/afaqueahmad7117/databricks-masterclass/tree/main/delta_lake): `delta_lake`

### Other components

- **Project operator**
- **Azure Event Hubs**

## Connections

- Project operator → Generation runner: runs (evidence: `projects/databricks-e2e-project/00_synthetic_data/03_run.py`)
- Generation runner → Master data generator: invokes (evidence: `projects/databricks-e2e-project/00_synthetic_data/03_run.py`)
- Generation runner → Historical orders: invokes (evidence: `projects/databricks-e2e-project/00_synthetic_data/03_run.py`)
- Generation runner → Review generator: invokes (evidence: `projects/databricks-e2e-project/00_synthetic_data/03_run.py`)
- Historical orders → Master data generator: reads CSVs (evidence: `projects/databricks-e2e-project/00_synthetic_data/01_historical_orders.py`)
- Review generator → Historical orders: reads orders (evidence: `projects/databricks-e2e-project/00_synthetic_data/02_reviews.py`)
- Project operator → Live order generator: runs
- Live order generator → Azure Event Hubs: sends events (evidence: `projects/databricks-e2e-project/00_synthetic_data/04_eventhub_orders.py`)
- Azure Event Hubs → Bronze streaming orders: streams events (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_ingest_eventhub.py`)
- Bronze streaming orders → Silver order facts: reads stream (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_orders.py`)
- Bronze streaming orders → Silver item facts: reads stream (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/silver/fact_order_items.py`)
- Silver order facts → Sales summary: reads facts (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_sales_summary.py`)
- Bronze reference data → Customer 360: reads customers (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`)
- Silver order facts → Customer 360: reads facts (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`)
- Silver item facts → Customer 360: reads facts (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`)
- Silver review facts → Customer 360: reads facts (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_customer_360.py`)
- Bronze reference data → Restaurant reviews: reads restaurants (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_restaurant_reviews.py`)
- Silver review facts → Restaurant reviews: reads facts (evidence: `projects/databricks-e2e-project/01_pipelines/pipeline_bronze_to_gold/gold/d_restaurant_reviews.py`)
- Project operator → Delta Lake tutorials: studies
