# subhamkharwal/pyspark-zero-to-hero architecture

> Architecture diagram of the GitHub repository subhamkharwal/pyspark-zero-to-hero, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/subhamkharwal/pyspark-zero-to-hero
- Repository: https://github.com/subhamkharwal/pyspark-zero-to-hero

## Overview

This repository is an educational PySpark course, not a packaged application. Its user workflow is to follow the lesson series and work through examples that progress from Spark basics to advanced execution and storage topics. The README confirms the course and video series; the tree supplies lesson subjects. Only the cluster example’s execution details were sampled, so lesson-to-lesson runtime relationships are not inferred.

Main entry points: [`12_understand_cluster.py`](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/12_understand_cluster.py) (Cluster execution), [`README.md`](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/README.md) (PySpark course)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fundamentals["Spark fundamentals"]
  node_curriculum["PySpark course<br/>[README.md]"]
  node_session["Spark session"]
  node_transform1["Basic transformations"]
  node_transform2["More transformations"]
  node_strings["Strings and dates"]
  node_udf["User functions"]
end

subgraph group_data["Data operations"]
  node_sortagg["Sort and aggregate"]
  node_windows["Windows and unique data"]
  node_joins["Joins and partitions"]
  node_csv["CSV reading"]
  node_formats["Complex formats"]
  node_json["JSON reading"]
  node_sql["Spark SQL<br/>[22_spark_sql.ipynb]"]
end

subgraph group_execution["Execution and tuning"]
  node_cluster["Cluster execution"]
  node_dag["DAG plans"]
  node_shuffles["Shuffle tuning"]
  node_caching["Caching"]
  node_shared["Shared variables"]
  node_joinopt["Join optimization"]
  node_allocation["Dynamic allocation"]
  node_skew["Skew and spill"]
  node_aqe["Adaptive execution<br/>[21_aqe_spark.ipynb]"]
  node_concurrent["Concurrent tasks"]
  node_memory["Memory and OOM"]
end

subgraph group_storage["Storage and formats"]
  node_writing["Data writing"]
  node_delta["Delta Lake"]
  node_scan["Scanning and partitions"]
  node_zorder["Delta optimization"]
end

node_learner(("Learner"))
node_spark["Spark runtime"]
node_output[("CSV output")]

node_learner -->|"follows"| node_curriculum
node_cluster -->|"creates session"| node_spark
node_cluster -->|"writes CSV"| node_output

click node_curriculum "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/README.md"
click node_session "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/01_spark_session.ipynb"
click node_transform1 "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/02_basic_transformations_1.ipynb"
click node_transform2 "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/03_basic_transformations_2.ipynb"
click node_strings "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/04_string_and_dates.ipynb"
click node_sortagg "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/05_sort_union_aggregation.ipynb"
click node_windows "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/06_unique_data_and_window.ipynb"
click node_joins "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/07_joins_and_data_partitions.ipynb"
click node_csv "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/08_reading_from_csv_files.ipynb"
click node_formats "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/09_reading_complex_data_formats.ipynb"
click node_json "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/10_read_json_files.ipynb"
click node_writing "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/11_writing_data.ipynb"
click node_cluster "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/12_understand_cluster.py"
click node_udf "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/13_User_Defined_Functions.ipynb"
click node_dag "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/14_understand_dag_plan.ipynb"
click node_shuffles "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/15_optimizing_shuffles.ipynb"
click node_caching "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/16_spark_caching_techiniques.ipynb"
click node_shared "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/17_distributed_shared_variables.ipynb"
click node_joinopt "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/18_optimizing_joins.ipynb"
click node_allocation "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/19_dynamic_allocation.ipynb"
click node_skew "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/20_skewness_and_spillage.ipynb"
click node_aqe "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/21_aqe_spark.ipynb"
click node_sql "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/22_spark_sql.ipynb"
click node_delta "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/23_delta_lake.ipynb"
click node_scan "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/24_data_scanning_and_partitioning.ipynb"
click node_zorder "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/25_delta_lake_optimization_and_z_ordering.ipynb"
click node_concurrent "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/26_run_concurrent_tasks.ipynb"
click node_memory "https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/27_spark_memory_and_oom.ipynb"

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_curriculum,node_session,node_transform1,node_transform2,node_strings,node_udf toneBlue
class node_sortagg,node_windows,node_joins,node_csv,node_formats,node_json,node_sql,node_output toneAmber
class node_cluster,node_dag,node_shuffles,node_caching,node_shared,node_joinopt,node_allocation,node_skew,node_aqe,node_concurrent,node_memory toneMint
class node_writing,node_delta,node_scan,node_zorder toneRose
class node_learner,node_spark toneIndigo
```

## Components

### Spark fundamentals

- [PySpark course](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/README.md): `README.md`
- [Spark session](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/01_spark_session.ipynb): `01_spark_session.ipynb`
- [Basic transformations](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/02_basic_transformations_1.ipynb): `02_basic_transformations_1.ipynb`
- [More transformations](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/03_basic_transformations_2.ipynb): `03_basic_transformations_2.ipynb`
- [Strings and dates](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/04_string_and_dates.ipynb): `04_string_and_dates.ipynb`
- [User functions](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/13_User_Defined_Functions.ipynb): `13_User_Defined_Functions.ipynb`

### Data operations

- [Sort and aggregate](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/05_sort_union_aggregation.ipynb): `05_sort_union_aggregation.ipynb`
- [Windows and unique data](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/06_unique_data_and_window.ipynb): `06_unique_data_and_window.ipynb`
- [Joins and partitions](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/07_joins_and_data_partitions.ipynb): `07_joins_and_data_partitions.ipynb`
- [CSV reading](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/08_reading_from_csv_files.ipynb): `08_reading_from_csv_files.ipynb`
- [Complex formats](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/09_reading_complex_data_formats.ipynb): `09_reading_complex_data_formats.ipynb`
- [JSON reading](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/10_read_json_files.ipynb): `10_read_json_files.ipynb`
- [Spark SQL](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/22_spark_sql.ipynb): `22_spark_sql.ipynb`

### Execution and tuning

- [Cluster execution](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/12_understand_cluster.py): `12_understand_cluster.py`
- [DAG plans](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/14_understand_dag_plan.ipynb): `14_understand_dag_plan.ipynb`
- [Shuffle tuning](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/15_optimizing_shuffles.ipynb): `15_optimizing_shuffles.ipynb`
- [Caching](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/16_spark_caching_techiniques.ipynb): `16_spark_caching_techiniques.ipynb`
- [Shared variables](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/17_distributed_shared_variables.ipynb): `17_distributed_shared_variables.ipynb`
- [Join optimization](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/18_optimizing_joins.ipynb): `18_optimizing_joins.ipynb`
- [Dynamic allocation](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/19_dynamic_allocation.ipynb): `19_dynamic_allocation.ipynb`
- [Skew and spill](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/20_skewness_and_spillage.ipynb): `20_skewness_and_spillage.ipynb`
- [Adaptive execution](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/21_aqe_spark.ipynb): `21_aqe_spark.ipynb`
- [Concurrent tasks](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/26_run_concurrent_tasks.ipynb): `26_run_concurrent_tasks.ipynb`
- [Memory and OOM](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/27_spark_memory_and_oom.ipynb): `27_spark_memory_and_oom.ipynb`

### Storage and formats

- [Data writing](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/11_writing_data.ipynb): `11_writing_data.ipynb`
- [Delta Lake](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/23_delta_lake.ipynb): `23_delta_lake.ipynb`
- [Scanning and partitions](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/24_data_scanning_and_partitioning.ipynb): `24_data_scanning_and_partitioning.ipynb`
- [Delta optimization](https://github.com/subhamkharwal/pyspark-zero-to-hero/blob/master/25_delta_lake_optimization_and_z_ordering.ipynb): `25_delta_lake_optimization_and_z_ordering.ipynb`

### Other components

- **Learner**
- **Spark runtime**
- **CSV output**

## Connections

- Learner → PySpark course: follows (evidence: `README.md`)
- Cluster execution → Spark runtime: creates session (evidence: `12_understand_cluster.py`)
- Cluster execution → CSV output: writes CSV (evidence: `12_understand_cluster.py`)
