# demainman/etl-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/demainman/etl-pipeline
- Repository: https://github.com/demainman/etl-pipeline

## Overview

This is a small COVID-19 ETL application. A user starts the CLI orchestrator, which downloads Johns Hopkins’ wide CSV, transforms it into validated daily records, and loads those records idempotently into SQLite. The database can also be summarized through the CLI. Configuration supplies source, path, and schema defaults. The graph follows the README and shown source; unsampled implementation details are omitted.

Main entry points: [`src/run_pipeline.py`](https://github.com/demainman/etl-pipeline/blob/main/src/run_pipeline.py) (Pipeline CLI), [`src/load.py`](https://github.com/demainman/etl-pipeline/blob/main/src/load.py) (SQLite loading), [`src/config.py`](https://github.com/demainman/etl-pipeline/blob/main/src/config.py) (Pipeline config), [`src/extract.py`](https://github.com/demainman/etl-pipeline/blob/main/src/extract.py) (CSV extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Pipeline control"]
  node_orchestrator["Pipeline CLI<br/>[run_pipeline.py]"]
  node_config["Pipeline config<br/>[config.py]"]
end

subgraph group_etl["ETL stages"]
  node_extract["CSV extraction<br/>[extract.py]"]
  node_transform["Clean and reshape<br/>[transform.py]"]
  node_load["SQLite loading<br/>[load.py]"]
end

subgraph group_storage["Data storage"]
  node_raw["Raw CSV"]
  node_processed["Processed CSV"]
  node_database[("SQLite database")]
end

node_user(("CLI user"))
node_source["JHU CSV source"]

node_user -->|"runs"| node_orchestrator
node_orchestrator -->|"calls"| node_extract
node_orchestrator -->|"calls"| node_transform
node_orchestrator -->|"calls"| node_load
node_config -->|"configures"| node_orchestrator
node_config -->|"configures"| node_extract
node_config -->|"configures"| node_transform
node_config -->|"configures"| node_load
node_extract -->|"fetches"| node_source
node_extract -->|"writes"| node_raw
node_transform -->|"reads"| node_raw
node_transform -->|"writes"| node_processed
node_load -->|"reads"| node_processed
node_load -->|"writes"| node_database
node_orchestrator -->|"requests summary"| node_load

click node_orchestrator "https://github.com/demainman/etl-pipeline/blob/main/src/run_pipeline.py"
click node_config "https://github.com/demainman/etl-pipeline/blob/main/src/config.py"
click node_extract "https://github.com/demainman/etl-pipeline/blob/main/src/extract.py"
click node_transform "https://github.com/demainman/etl-pipeline/blob/main/src/transform.py"
click node_load "https://github.com/demainman/etl-pipeline/blob/main/src/load.py"
click node_raw "https://github.com/demainman/etl-pipeline/tree/main/data/raw"
click node_processed "https://github.com/demainman/etl-pipeline/tree/main/data/processed"

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,node_config,node_user toneBlue
class node_extract,node_transform,node_load toneAmber
class node_raw,node_processed,node_database toneMint
class node_source toneIndigo
```

## Components

### Pipeline control

- [Pipeline CLI](https://github.com/demainman/etl-pipeline/blob/main/src/run_pipeline.py): `src/run_pipeline.py`
- [Pipeline config](https://github.com/demainman/etl-pipeline/blob/main/src/config.py): `src/config.py`

### ETL stages

- [CSV extraction](https://github.com/demainman/etl-pipeline/blob/main/src/extract.py): `src/extract.py`
- [Clean and reshape](https://github.com/demainman/etl-pipeline/blob/main/src/transform.py): `src/transform.py`
- [SQLite loading](https://github.com/demainman/etl-pipeline/blob/main/src/load.py): `src/load.py`

### Data storage

- [Raw CSV](https://github.com/demainman/etl-pipeline/tree/main/data/raw): `data/raw`
- [Processed CSV](https://github.com/demainman/etl-pipeline/tree/main/data/processed): `data/processed`
- **SQLite database**

### Other components

- **CLI user**
- **JHU CSV source**

## Connections

- CLI user → Pipeline CLI: runs (evidence: `README.md`)
- Pipeline CLI → CSV extraction: calls (evidence: `src/run_pipeline.py`)
- Pipeline CLI → Clean and reshape: calls (evidence: `src/run_pipeline.py`)
- Pipeline CLI → SQLite loading: calls (evidence: `src/run_pipeline.py`)
- Pipeline config → Pipeline CLI: configures (evidence: `src/run_pipeline.py`)
- Pipeline config → CSV extraction: configures (evidence: `src/extract.py`)
- Pipeline config → Clean and reshape: configures (evidence: `src/transform.py`)
- Pipeline config → SQLite loading: configures (evidence: `src/load.py`)
- CSV extraction → JHU CSV source: fetches (evidence: `README.md`)
- CSV extraction → Raw CSV: writes (evidence: `README.md`)
- Clean and reshape → Raw CSV: reads (evidence: `src/transform.py`)
- Clean and reshape → Processed CSV: writes (evidence: `README.md`)
- SQLite loading → Processed CSV: reads (evidence: `README.md`)
- SQLite loading → SQLite database: writes (evidence: `README.md`)
- Pipeline CLI → SQLite loading: requests summary (evidence: `src/run_pipeline.py`)
