# mubashirmian/etl-pipeline-airflow architecture

> Architecture diagram of the GitHub repository mubashirmian/etl-pipeline-airflow, 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/mubashirmian/etl-pipeline-airflow
- Repository: https://github.com/mubashirmian/etl-pipeline-airflow

## Overview

This repository contains two independent Airflow example workflows: a scheduled weather ETL that stores current conditions in PostgreSQL, and an astronaut example that fetches people in space and dynamically prints one result per person. The excerpts show each workflow’s task calls and external interactions. They do not show Airflow’s runtime internals, so the graph focuses on the declared task flow and its inputs and outputs.

Main entry points: [`dags/exampledag.py`](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py) (Fetch astronauts), [`dags/etlweather.py`](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py) (Extract weather)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_weather["Weather ETL"]
  node_weather_extract["Extract weather<br/>[etlweather.py]"]
  node_weather_transform["Transform weather<br/>[etlweather.py]"]
  node_weather_load["Load weather<br/>[etlweather.py]"]
end

subgraph group_astronauts["Astronaut example"]
  node_get_astronauts["Fetch astronauts<br/>[exampledag.py]"]
  node_mapped_print["Mapped print task<br/>[exampledag.py]"]
  node_astronaut_dataset["Current astronauts dataset<br/>[exampledag.py]"]
end

node_open_meteo["Open-Meteo API"]
node_postgres[("PostgreSQL")]
node_open_notify["Open Notify API"]
node_console["Task output"]

node_weather_extract -->|"requests weather"| node_open_meteo
node_weather_extract -->|"passes data"| node_weather_transform
node_weather_transform -->|"passes data"| node_weather_load
node_weather_load -->|"writes rows"| node_postgres
node_get_astronauts -->|"requests people"| node_open_notify
node_get_astronauts -->|"maps results"| node_mapped_print
node_mapped_print -->|"prints details"| node_console
node_get_astronauts -->|"publishes dataset"| node_astronaut_dataset

click node_weather_extract "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py"
click node_weather_transform "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py"
click node_weather_load "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py"
click node_get_astronauts "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py"
click node_mapped_print "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py"
click node_astronaut_dataset "https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.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_weather_extract,node_weather_transform,node_weather_load toneBlue
class node_get_astronauts,node_mapped_print,node_astronaut_dataset,node_postgres toneAmber
class node_open_meteo,node_open_notify toneMint
class node_console toneRose
```

## Components

### Weather ETL

- [Extract weather](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py): `dags/etlweather.py`
- [Transform weather](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py): `dags/etlweather.py`
- [Load weather](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/etlweather.py): `dags/etlweather.py`

### Astronaut example

- [Fetch astronauts](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py): `dags/exampledag.py`
- [Mapped print task](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py): `dags/exampledag.py`
- [Current astronauts dataset](https://github.com/mubashirmian/etl-pipeline-airflow/blob/main/dags/exampledag.py): `dags/exampledag.py`

### Other components

- **Open-Meteo API**
- **PostgreSQL**
- **Open Notify API**
- **Task output**

## Connections

- Extract weather → Open-Meteo API: requests weather (evidence: `dags/etlweather.py`)
- Extract weather → Transform weather: passes data (evidence: `dags/etlweather.py`)
- Transform weather → Load weather: passes data (evidence: `dags/etlweather.py`)
- Load weather → PostgreSQL: writes rows (evidence: `dags/etlweather.py`)
- Fetch astronauts → Open Notify API: requests people (evidence: `dags/exampledag.py`)
- Fetch astronauts → Mapped print task: maps results (evidence: `dags/exampledag.py`)
- Mapped print task → Task output: prints details (evidence: `dags/exampledag.py`)
- Fetch astronauts → Current astronauts dataset: publishes dataset (evidence: `dags/exampledag.py`)
