# pranava-kailash/weather_data_etl architecture

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

- Interactive diagram: https://gitdiagram.com/pranava-kailash/weather_data_etl
- Repository: https://github.com/pranava-kailash/weather_data_etl

## Overview

The product is a daily Airflow weather ETL: the DAG extracts OpenWeather data for configured coordinates, reshapes location/current/hourly/daily fields, and loads them into PostgreSQL. The sampled DAG shows the task dependencies and database writes. The README documents Airflow scheduling/monitoring and containerized deployment; deployment files are not runtime ETL components. The only core source module is dags/etlweather.py, so distinct stages are represented without inventing separate modules.

Main entry points: [`dags/etlweather.py`](https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py) (Weather extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_scheduler(("Airflow schedule"))
  node_dag["Weather DAG<br/>[etlweather.py]"]
end

subgraph group_etl["Weather ETL"]
  node_extract["Weather extraction<br/>[etlweather.py]"]
  node_transform["Weather transformation<br/>[etlweather.py]"]
end

subgraph group_storage["Persistence"]
  node_load["PostgreSQL loader<br/>[etlweather.py]"]
end

node_openweather{{"OpenWeather API"}}
node_postgres[("PostgreSQL")]

node_scheduler -->|"triggers daily"| node_dag
node_dag -->|"dispatches"| node_extract
node_extract -->|"requests weather"| node_openweather
node_extract -->|"passes response"| node_transform
node_transform -->|"passes shaped data"| node_load
node_load -->|"writes tables"| node_postgres

click node_dag "https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py"
click node_extract "https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py"
click node_transform "https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py"
click node_load "https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.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_scheduler,node_dag toneBlue
class node_extract,node_transform,node_postgres toneAmber
class node_load,node_openweather toneMint
```

## Components

### Orchestration

- **Airflow schedule**
- [Weather DAG](https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py): `dags/etlweather.py`

### Weather ETL

- [Weather extraction](https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py): `dags/etlweather.py`
- [Weather transformation](https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py): `dags/etlweather.py`

### Persistence

- [PostgreSQL loader](https://github.com/pranava-kailash/weather_data_etl/blob/main/dags/etlweather.py): `dags/etlweather.py`

### Other components

- **OpenWeather API**
- **PostgreSQL**

## Connections

- Airflow schedule → Weather DAG: triggers daily (evidence: `dags/etlweather.py`)
- Weather DAG → Weather extraction: dispatches (evidence: `dags/etlweather.py`)
- Weather extraction → OpenWeather API: requests weather (evidence: `dags/etlweather.py`)
- Weather extraction → Weather transformation: passes response (evidence: `dags/etlweather.py`)
- Weather transformation → PostgreSQL loader: passes shaped data (evidence: `dags/etlweather.py`)
- PostgreSQL loader → PostgreSQL: writes tables (evidence: `dags/etlweather.py`)
