# trraveendra/pysparkraveendra architecture

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

- Interactive diagram: https://gitdiagram.com/trraveendra/pysparkraveendra
- Repository: https://github.com/trraveendra/pysparkraveendra

## Overview

This repository is a collection of data-engineering tutorials, datasets, and cloud-pipeline examples rather than one integrated application. A representative user workflow is the airline Spark Declarative Pipeline: ingest raw flight data, produce cleaned and quarantined records, then publish gold analytics. Separate examples demonstrate CDC/SCD processing and Databricks and Azure Data Factory concepts. The graph emphasizes relationships visible in the sampled pipeline sources; many other notebooks, ADF assets, and project bundles are independent examples whose internal wiring was not inspected.

Main entry points: [`de_notebooks/SparkDeclarativePipelines.py`](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py) (Validated silver), [`de_notebooks/2.scd_type1_Type2.py`](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py) (Snapshot view), [`de_notebooks/SDP_only_SCD_examples.py`](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SDP_only_SCD_examples.py) (Employee SCD demo), [`key_concepts_for_Interview.py`](https://github.com/trraveendra/pysparkraveendra/blob/master/key_concepts_for_Interview.py) (Spark and Delta concepts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_airline["Airline pipeline"]
  node_airline_source[("Airline input")]
  node_raw["Raw ingestion"]
  node_clean["Clean bronze"]
  node_quarantine["Quarantine"]
  node_silver["Validated silver"]
  node_otp["Monthly OTP"]
  node_delay["Delay analytics"]
  node_airport["Airport KPIs"]
end

subgraph group_cdc["CDC examples"]
  node_cdc_source[("Customer CDC events")]
  node_snapshot["Snapshot view"]
  node_staging["Customer staging"]
  node_customer_summary["Customer summary"]
  node_cdc_targets[("SCD current/history")]
  node_cdc_sink[("Delta CDC sink")]
  node_employee_scd["Employee SCD demo"]
end

subgraph group_learning["Learning materials"]
  node_spark_concepts["Spark and Delta concepts"]
  node_scd_examples["SCD examples<br/>[readme.md]"]
  node_notebook_samples["Notebook samples"]
end

subgraph group_cloud["Cloud project assets"]
  node_adf_assets["ADF pipelines and datasets"]
  node_project_assets["Data-engineering projects"]
  node_datasets[("Example datasets")]
end

node_user(("Learner / engineer"))

node_user -->|"studies"| node_spark_concepts
node_user -->|"explores"| node_airline_source
node_airline_source -.->|"streams in"| node_raw
node_raw -->|"reads raw"| node_clean
node_raw -->|"reads raw"| node_quarantine
node_clean -->|"cleans and validates"| node_silver
node_silver -->|"aggregates"| node_otp
node_silver -->|"analyzes delays"| node_delay
node_silver -->|"aggregates airports"| node_airport
node_cdc_source -->|"reads snapshot"| node_snapshot
node_snapshot -->|"selects and casts"| node_staging
node_staging -->|"groups by state"| node_customer_summary
node_cdc_source -->|"applies CDC flows"| node_cdc_targets
node_cdc_source -->|"appends events"| node_cdc_sink
node_user -->|"runs demo"| node_employee_scd
node_user -->|"uses examples"| node_notebook_samples
node_user -->|"explores"| node_adf_assets
node_user -->|"explores"| node_project_assets

click node_raw "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_clean "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_quarantine "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_silver "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_otp "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_delay "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_airport "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py"
click node_snapshot "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py"
click node_staging "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py"
click node_customer_summary "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py"
click node_cdc_targets "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py"
click node_cdc_sink "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py"
click node_employee_scd "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SDP_only_SCD_examples.py"
click node_spark_concepts "https://github.com/trraveendra/pysparkraveendra/blob/master/key_concepts_for_Interview.py"
click node_scd_examples "https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/readme.md"
click node_adf_assets "https://github.com/trraveendra/pysparkraveendra/tree/master/factory"
click node_project_assets "https://github.com/trraveendra/pysparkraveendra/tree/master/DE_Projects"
click node_datasets "https://github.com/trraveendra/pysparkraveendra/tree/master/SH"

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_airline_source,node_raw,node_clean,node_quarantine,node_silver,node_otp,node_delay,node_airport toneBlue
class node_cdc_source,node_snapshot,node_staging,node_customer_summary,node_cdc_targets,node_cdc_sink,node_employee_scd toneAmber
class node_spark_concepts,node_scd_examples,node_notebook_samples toneMint
class node_adf_assets,node_project_assets,node_datasets toneRose
class node_user toneIndigo
```

## Components

### Airline pipeline

- **Airline input**
- [Raw ingestion](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Clean bronze](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Quarantine](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Validated silver](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Monthly OTP](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Delay analytics](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`
- [Airport KPIs](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SparkDeclarativePipelines.py): `de_notebooks/SparkDeclarativePipelines.py`

### CDC examples

- **Customer CDC events**
- [Snapshot view](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py): `de_notebooks/2.scd_type1_Type2.py`
- [Customer staging](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py): `de_notebooks/2.scd_type1_Type2.py`
- [Customer summary](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py): `de_notebooks/2.scd_type1_Type2.py`
- [SCD current/history](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py): `de_notebooks/2.scd_type1_Type2.py`
- [Delta CDC sink](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/2.scd_type1_Type2.py): `de_notebooks/2.scd_type1_Type2.py`
- [Employee SCD demo](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/SDP_only_SCD_examples.py): `de_notebooks/SDP_only_SCD_examples.py`

### Learning materials

- [Spark and Delta concepts](https://github.com/trraveendra/pysparkraveendra/blob/master/key_concepts_for_Interview.py): `key_concepts_for_Interview.py`
- [SCD examples](https://github.com/trraveendra/pysparkraveendra/blob/master/de_notebooks/readme.md): `de_notebooks/readme.md`
- **Notebook samples**

### Cloud project assets

- [ADF pipelines and datasets](https://github.com/trraveendra/pysparkraveendra/tree/master/factory): `factory`
- [Data-engineering projects](https://github.com/trraveendra/pysparkraveendra/tree/master/DE_Projects): `DE_Projects`
- [Example datasets](https://github.com/trraveendra/pysparkraveendra/tree/master/SH): `SH`

### Other components

- **Learner / engineer**

## Connections

- Learner / engineer → Spark and Delta concepts: studies (evidence: `README.md`)
- Learner / engineer → Airline input: explores (evidence: `README.md`)
- Airline input → Raw ingestion: streams in
- Raw ingestion → Clean bronze: reads raw (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Raw ingestion → Quarantine: reads raw (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Clean bronze → Validated silver: cleans and validates (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Validated silver → Monthly OTP: aggregates (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Validated silver → Delay analytics: analyzes delays (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Validated silver → Airport KPIs: aggregates airports (evidence: `de_notebooks/SparkDeclarativePipelines.py`)
- Customer CDC events → Snapshot view: reads snapshot (evidence: `de_notebooks/2.scd_type1_Type2.py`)
- Snapshot view → Customer staging: selects and casts (evidence: `de_notebooks/2.scd_type1_Type2.py`)
- Customer staging → Customer summary: groups by state (evidence: `de_notebooks/2.scd_type1_Type2.py`)
- Customer CDC events → SCD current/history: applies CDC flows (evidence: `de_notebooks/2.scd_type1_Type2.py`)
- Customer CDC events → Delta CDC sink: appends events (evidence: `de_notebooks/2.scd_type1_Type2.py`)
- Learner / engineer → Employee SCD demo: runs demo (evidence: `de_notebooks/SDP_only_SCD_examples.py`)
- Learner / engineer → Notebook samples: uses examples (evidence: `README.md`)
- Learner / engineer → ADF pipelines and datasets: explores (evidence: `README.md`)
- Learner / engineer → Data-engineering projects: explores (evidence: `README.md`)
