# janhms/advanced-etl-azure-databricks-pyspark architecture

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

- Interactive diagram: https://gitdiagram.com/janhms/advanced-etl-azure-databricks-pyspark
- Repository: https://github.com/janhms/advanced-etl-azure-databricks-pyspark

## Overview

This repository is a Databricks/Spark ETL project for Formula 1 data, with successive notebook implementations ranging from basic ingestion to dynamic, SparkSQL incremental, and Delta Lake incremental loads. The main workflow mounts ADLS data, ingests and normalizes entity files, transforms race results and standings, then stores processed or presentation data back in the lake. The README documents Azure Data Factory orchestration and PowerBI as broader project capabilities; the excerpts do not show their runtime wiring, so those links are documented but not source-verified.

Main entry points: [`4.Delta-Lake_Incremental_Load/ingestion`](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/4.Delta-Lake_Incremental_Load/ingestion) (Delta incremental ingestion), [`1.Ingest-basic`](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/1.Ingest-basic) (Basic file ingestion), [`2.Ingestion-Dynamic-Notebooks/ingestion`](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/2.Ingestion-Dynamic-Notebooks/ingestion) (Dynamic ingestion), [`3.SparkSQL_Incremental_Load/ingestion`](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/3.SparkSQL_Incremental_Load/ingestion) (SparkSQL incremental ingestion)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data ingestion"]
  node_basic_ingest["Basic file ingestion<br/>[1.Ingest-basic]"]
  node_dynamic_ingest["Dynamic ingestion<br/>[ingestion]"]
  node_spark_ingest["SparkSQL incremental ingestion<br/>[ingestion]"]
  node_delta_ingest["Delta incremental ingestion<br/>[ingestion]"]
  node_entity_files["F1 entity files"]
  node_common_functions["Ingestion helpers"]
end

subgraph group_transform["Transformations"]
  node_race_transform["Race results transform<br/>[1.race_results.py]"]
  node_driver_transform["Driver standings transform"]
  node_constructor_transform["Constructor standings transform"]
  node_calculated_results["Calculated race results"]
end

subgraph group_storage["Lake storage"]
  node_mount["ADLS mounting"]
  node_raw[("Raw ADLS data")]
  node_processed[("Processed Delta and Parquet")]
  node_presentation[("Presentation data")]
  node_configuration["Storage configuration<br/>[configuration.py]"]
end

subgraph group_orchestration["Orchestration and access"]
  node_adf["Azure Data Factory"]
  node_powerbi["PowerBI"]
end

node_engineer(("ETL operator"))

node_engineer -->|"sets up access"| node_mount
node_mount -->|"mounts containers"| node_raw
node_engineer -.->|"runs notebooks"| node_basic_ingest
node_engineer -.->|"runs notebooks"| node_dynamic_ingest
node_engineer -.->|"runs notebooks"| node_spark_ingest
node_engineer -.->|"runs notebooks"| node_delta_ingest
node_entity_files -->|"reads files"| node_basic_ingest
node_entity_files -->|"reads files"| node_dynamic_ingest
node_entity_files -->|"reads files"| node_spark_ingest
node_entity_files -->|"reads dated files"| node_delta_ingest
node_basic_ingest -->|"writes Parquet"| node_processed
node_dynamic_ingest -->|"writes Parquet"| node_processed
node_spark_ingest -->|"writes tables"| node_processed
node_delta_ingest -->|"merges Delta"| node_processed
node_delta_ingest -->|"calls helpers"| node_common_functions
node_configuration -.->|"configures paths"| node_delta_ingest
node_processed -.->|"transforms stored data"| node_race_transform
node_processed -.->|"transforms stored data"| node_driver_transform
node_processed -.->|"transforms stored data"| node_constructor_transform
node_processed -.->|"transforms stored data"| node_calculated_results
node_race_transform -.->|"loads results"| node_presentation
node_driver_transform -.->|"loads standings"| node_presentation
node_constructor_transform -.->|"loads standings"| node_presentation
node_calculated_results -.->|"loads results"| node_presentation
node_adf -.->|"orchestrates notebooks"| node_delta_ingest
node_presentation -.->|"serves analytics"| node_powerbi

click node_mount "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/set-up/mount_adls_storage.py"
click node_basic_ingest "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/1.Ingest-basic"
click node_dynamic_ingest "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/2.Ingestion-Dynamic-Notebooks/ingestion"
click node_spark_ingest "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/3.SparkSQL_Incremental_Load/ingestion"
click node_delta_ingest "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/4.Delta-Lake_Incremental_Load/ingestion"
click node_common_functions "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/includes/common_functions.py"
click node_race_transform "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/1.race_results.py"
click node_driver_transform "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/2.driver_standings.py"
click node_constructor_transform "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/3.constructor_standings.py"
click node_calculated_results "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/4.calculated_race_results.py"
click node_configuration "https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/includes/configuration.py"

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_basic_ingest,node_dynamic_ingest,node_spark_ingest,node_delta_ingest,node_entity_files,node_common_functions toneBlue
class node_race_transform,node_driver_transform,node_constructor_transform,node_calculated_results toneAmber
class node_mount,node_raw,node_processed,node_presentation,node_configuration toneMint
class node_adf,node_powerbi toneRose
class node_engineer toneIndigo
```

## Components

### Data ingestion

- [Basic file ingestion](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/1.Ingest-basic): `1.Ingest-basic`
- [Dynamic ingestion](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/2.Ingestion-Dynamic-Notebooks/ingestion): `2.Ingestion-Dynamic-Notebooks/ingestion`
- [SparkSQL incremental ingestion](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/3.SparkSQL_Incremental_Load/ingestion): `3.SparkSQL_Incremental_Load/ingestion`
- [Delta incremental ingestion](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/tree/main/4.Delta-Lake_Incremental_Load/ingestion): `4.Delta-Lake_Incremental_Load/ingestion`
- **F1 entity files**
- [Ingestion helpers](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/includes/common_functions.py): `4.Delta-Lake_Incremental_Load/includes/common_functions.py`

### Transformations

- [Race results transform](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/1.race_results.py): `4.Delta-Lake_Incremental_Load/trans/1.race_results.py`
- [Driver standings transform](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/2.driver_standings.py): `4.Delta-Lake_Incremental_Load/trans/2.driver_standings.py`
- [Constructor standings transform](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/3.constructor_standings.py): `4.Delta-Lake_Incremental_Load/trans/3.constructor_standings.py`
- [Calculated race results](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/trans/4.calculated_race_results.py): `4.Delta-Lake_Incremental_Load/trans/4.calculated_race_results.py`

### Lake storage

- [ADLS mounting](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/set-up/mount_adls_storage.py): `4.Delta-Lake_Incremental_Load/set-up/mount_adls_storage.py`
- **Raw ADLS data**
- **Processed Delta and Parquet**
- **Presentation data**
- [Storage configuration](https://github.com/janhms/advanced-etl-azure-databricks-pyspark/blob/main/4.Delta-Lake_Incremental_Load/includes/configuration.py): `4.Delta-Lake_Incremental_Load/includes/configuration.py`

### Orchestration and access

- **Azure Data Factory**
- **PowerBI**

### Other components

- **ETL operator**

## Connections

- ETL operator → ADLS mounting: sets up access
- ADLS mounting → Raw ADLS data: mounts containers (evidence: `4.Delta-Lake_Incremental_Load/set-up/mount_adls_storage.py`)
- ETL operator → Basic file ingestion: runs notebooks
- ETL operator → Dynamic ingestion: runs notebooks
- ETL operator → SparkSQL incremental ingestion: runs notebooks
- ETL operator → Delta incremental ingestion: runs notebooks
- F1 entity files → Basic file ingestion: reads files (evidence: `1.Ingest-basic/5.ingest_results_file.py`)
- F1 entity files → Dynamic ingestion: reads files (evidence: `2.Ingestion-Dynamic-Notebooks/ingestion/5.dyanmic_ingest_results_file.py`)
- F1 entity files → SparkSQL incremental ingestion: reads files (evidence: `3.SparkSQL_Incremental_Load/ingestion/5.ingest_results_file.py`)
- F1 entity files → Delta incremental ingestion: reads dated files (evidence: `4.Delta-Lake_Incremental_Load/ingestion/4.ingest_drivers_file.py`)
- Basic file ingestion → Processed Delta and Parquet: writes Parquet (evidence: `1.Ingest-basic/5.ingest_results_file.py`)
- Dynamic ingestion → Processed Delta and Parquet: writes Parquet (evidence: `2.Ingestion-Dynamic-Notebooks/ingestion/5.dyanmic_ingest_results_file.py`)
- SparkSQL incremental ingestion → Processed Delta and Parquet: writes tables (evidence: `3.SparkSQL_Incremental_Load/ingestion/5.ingest_results_file.py`)
- Delta incremental ingestion → Processed Delta and Parquet: merges Delta (evidence: `4.Delta-Lake_Incremental_Load/ingestion/5.ingest_results_file.py`)
- Delta incremental ingestion → Ingestion helpers: calls helpers (evidence: `4.Delta-Lake_Incremental_Load/ingestion/5.ingest_results_file.py`)
- Storage configuration → Delta incremental ingestion: configures paths
- Processed Delta and Parquet → Race results transform: transforms stored data
- Processed Delta and Parquet → Driver standings transform: transforms stored data
- Processed Delta and Parquet → Constructor standings transform: transforms stored data
- Processed Delta and Parquet → Calculated race results: transforms stored data
- Race results transform → Presentation data: loads results
- Driver standings transform → Presentation data: loads standings
- Constructor standings transform → Presentation data: loads standings
- Calculated race results → Presentation data: loads results
- Azure Data Factory → Delta incremental ingestion: orchestrates notebooks
- Presentation data → PowerBI: serves analytics
