# akashdeep-bit-gif/30-day-data-engineering-marathon architecture

> Architecture diagram of the GitHub repository akashdeep-bit-gif/30-day-data-engineering-marathon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/akashdeep-bit-gif/30-day-data-engineering-marathon
- Repository: https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon

## Overview

This repository implements a weather-data ETL pipeline. An operator starts the orchestrator, which runs five stages in order: fetch current weather into raw JSON, load it into staging, transform records into analytics data, aggregate daily summaries, and audit data quality. PostgreSQL is the shared store. The source excerpts show the stage sequence and each stage’s storage operations; there is no README describing additional capabilities.

Main entry points: [`code/day-06-orchestrator/run_pipeline.py`](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-06-orchestrator/run_pipeline.py) (Pipeline runner), [`code/day-01-api-ingest/extract.py`](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-01-api-ingest/extract.py) (Weather extractor), [`code/day-02-db-stage/load_staging.py`](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-02-db-stage/load_staging.py) (Staging loader), [`code/day-03-transform/transform_data.py`](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-03-transform/transform_data.py) (Weather transformer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline orchestration"]
  node_orchestrator["Pipeline runner<br/>[run_pipeline.py]"]
end

subgraph group_ingest["Weather ingestion"]
  node_raw_json["Raw JSON files"]
  node_staging_loader["Staging loader<br/>[load_staging.py]"]
  node_extractor["Weather extractor<br/>[extract.py]"]
end

subgraph group_analytics["Analytics processing"]
  node_transformer["Weather transformer<br/>[transform_data.py]"]
  node_aggregator["Daily aggregator<br/>[aggregate_daily.py]"]
end

subgraph group_quality["Data quality"]
  node_quality_audit["Quality validator<br/>[validate_data.py]"]
end

node_operator(("Operator"))
node_weather_api{{"Open-Meteo API"}}
node_postgres[("Weather database")]

node_operator -->|"starts"| node_orchestrator
node_orchestrator -->|"runs first"| node_extractor
node_orchestrator -->|"runs second"| node_staging_loader
node_orchestrator -->|"runs third"| node_transformer
node_orchestrator -->|"runs fourth"| node_aggregator
node_orchestrator -->|"runs fifth"| node_quality_audit
node_extractor -->|"fetches weather"| node_weather_api
node_extractor -->|"writes JSON"| node_raw_json
node_raw_json -->|"reads JSON"| node_staging_loader
node_staging_loader -->|"writes staging"| node_postgres
node_transformer -->|"reads staging; writes analytics"| node_postgres
node_aggregator -->|"reads analytics; writes summaries"| node_postgres
node_quality_audit -->|"checks staging and analytics"| node_postgres

click node_orchestrator "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-06-orchestrator/run_pipeline.py"
click node_staging_loader "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-02-db-stage/load_staging.py"
click node_transformer "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-03-transform/transform_data.py"
click node_aggregator "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-04-aggregate/aggregate_daily.py"
click node_quality_audit "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-05-quality/validate_data.py"
click node_extractor "https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-01-api-ingest/extract.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_orchestrator toneBlue
class node_raw_json,node_staging_loader,node_extractor,node_postgres toneAmber
class node_transformer,node_aggregator,node_weather_api toneMint
class node_quality_audit toneRose
class node_operator toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline runner](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-06-orchestrator/run_pipeline.py): `code/day-06-orchestrator/run_pipeline.py`

### Weather ingestion

- **Raw JSON files**
- [Staging loader](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-02-db-stage/load_staging.py): `code/day-02-db-stage/load_staging.py`
- [Weather extractor](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-01-api-ingest/extract.py): `code/day-01-api-ingest/extract.py`

### Analytics processing

- [Weather transformer](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-03-transform/transform_data.py): `code/day-03-transform/transform_data.py`
- [Daily aggregator](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-04-aggregate/aggregate_daily.py): `code/day-04-aggregate/aggregate_daily.py`

### Data quality

- [Quality validator](https://github.com/akashdeep-bit-gif/30-day-data-engineering-marathon/blob/master/code/day-05-quality/validate_data.py): `code/day-05-quality/validate_data.py`

### Other components

- **Operator**
- **Open-Meteo API**
- **Weather database**

## Connections

- Operator → Pipeline runner: starts (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Pipeline runner → Weather extractor: runs first (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Pipeline runner → Staging loader: runs second (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Pipeline runner → Weather transformer: runs third (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Pipeline runner → Daily aggregator: runs fourth (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Pipeline runner → Quality validator: runs fifth (evidence: `code/day-06-orchestrator/run_pipeline.py`)
- Weather extractor → Open-Meteo API: fetches weather (evidence: `code/day-01-api-ingest/extract.py`)
- Weather extractor → Raw JSON files: writes JSON (evidence: `code/day-01-api-ingest/extract.py`)
- Raw JSON files → Staging loader: reads JSON (evidence: `code/day-02-db-stage/load_staging.py`)
- Staging loader → Weather database: writes staging (evidence: `code/day-02-db-stage/load_staging.py`)
- Weather transformer → Weather database: reads staging; writes analytics (evidence: `code/day-03-transform/transform_data.py`)
- Daily aggregator → Weather database: reads analytics; writes summaries (evidence: `code/day-04-aggregate/aggregate_daily.py`)
- Quality validator → Weather database: checks staging and analytics (evidence: `code/day-05-quality/validate_data.py`)
