# pavankumarmanagoli/airflow-sales-etl-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/pavankumarmanagoli/airflow-sales-etl-pipeline
- Repository: https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline

## Overview

The product is an Airflow batch ETL pipeline: a run reads Superstore CSV data, cleans and enriches it, stages rows in SQLite, then builds star-schema dimensions and a sales fact table. The repository also has small scripts for querying those tables. The separate astronaut DAG is an Airflow example, not part of the README-described sales workflow. Edges reflect the sampled pipeline and transformation code; the model scripts are simple database readers.

Main entry points: [`dags/superstore_transformation.py`](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py) (Dimension builders), [`include/superstore.db`](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/include/superstore.db) (Staging data), [`dags/superstore_pipeline_sqlite.py`](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_pipeline_sqlite.py) (Sales DAG), [`model/dim_customers.py`](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_customers.py) (Customer query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Pipeline orchestration"]
  node_pipeline["Sales DAG"]
end

subgraph group_etl["Extract and transform"]
  node_etl_job["Load and enrich"]
  node_csv["Superstore CSV<br/>[Superstore.csv]"]
  node_transform["Dimension builders"]
end

subgraph group_warehouse["SQLite warehouse"]
  node_staging[("Staging data<br/>[superstore.db]")]
  node_customers["Customer dimension"]
  node_products["Product dimension"]
  node_dates["Date dimension"]
  node_locations["Location dimension"]
  node_fact["Sales fact"]
end

subgraph group_inspection["Warehouse inspection"]
  node_customers_reader["Customer query<br/>[dim_customers.py]"]
  node_products_reader["Product query<br/>[dim_products.py]"]
  node_dates_reader["Date query<br/>[dim_dates.py]"]
  node_location_reader["Location query<br/>[dim_location.py]"]
  node_fact_reader["Fact query<br/>[fact_sales.py]"]
  node_staging_reader["Staging query<br/>[sales_data.py]"]
end

node_scheduler(("Airflow scheduler"))

node_scheduler -->|"triggers"| node_pipeline
node_pipeline -->|"runs task"| node_etl_job
node_etl_job -->|"reads"| node_csv
node_etl_job -->|"writes staging"| node_staging
node_pipeline -->|"registers builders"| node_transform
node_transform -->|"reads and writes"| node_staging
node_transform -->|"creates"| node_customers
node_transform -->|"creates"| node_products
node_transform -->|"creates"| node_dates
node_transform -->|"creates"| node_locations
node_transform -->|"builds"| node_fact
node_customers_reader -->|"queries"| node_staging
node_products_reader -->|"queries"| node_staging
node_dates_reader -->|"queries"| node_staging
node_location_reader -->|"queries"| node_staging
node_fact_reader -->|"queries"| node_staging
node_staging_reader -->|"queries"| node_staging

click node_pipeline "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_pipeline_sqlite.py"
click node_etl_job "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_pipeline_sqlite.py"
click node_csv "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/include/Superstore.csv"
click node_transform "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_staging "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/include/superstore.db"
click node_customers "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_products "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_dates "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_locations "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_fact "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py"
click node_customers_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_customers.py"
click node_products_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_products.py"
click node_dates_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_dates.py"
click node_location_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_location.py"
click node_fact_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/fact_sales.py"
click node_staging_reader "https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/sales_data.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_pipeline toneBlue
class node_etl_job,node_csv,node_transform toneAmber
class node_staging,node_customers,node_products,node_dates,node_locations,node_fact toneMint
class node_customers_reader,node_products_reader,node_dates_reader,node_location_reader,node_fact_reader,node_staging_reader,node_scheduler toneRose
```

## Components

### Pipeline orchestration

- [Sales DAG](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_pipeline_sqlite.py): `dags/superstore_pipeline_sqlite.py`

### Extract and transform

- [Load and enrich](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_pipeline_sqlite.py): `dags/superstore_pipeline_sqlite.py`
- [Superstore CSV](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/include/Superstore.csv): `include/Superstore.csv`
- [Dimension builders](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`

### SQLite warehouse

- [Staging data](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/include/superstore.db): `include/superstore.db`
- [Customer dimension](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`
- [Product dimension](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`
- [Date dimension](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`
- [Location dimension](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`
- [Sales fact](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/dags/superstore_transformation.py): `dags/superstore_transformation.py`

### Warehouse inspection

- [Customer query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_customers.py): `model/dim_customers.py`
- [Product query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_products.py): `model/dim_products.py`
- [Date query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_dates.py): `model/dim_dates.py`
- [Location query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/dim_location.py): `model/dim_location.py`
- [Fact query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/fact_sales.py): `model/fact_sales.py`
- [Staging query](https://github.com/pavankumarmanagoli/airflow-sales-etl-pipeline/blob/main/model/sales_data.py): `model/sales_data.py`

### Other components

- **Airflow scheduler**

## Connections

- Airflow scheduler → Sales DAG: triggers (evidence: `dags/superstore_pipeline_sqlite.py`)
- Sales DAG → Load and enrich: runs task (evidence: `dags/superstore_pipeline_sqlite.py`)
- Load and enrich → Superstore CSV: reads (evidence: `dags/superstore_pipeline_sqlite.py`)
- Load and enrich → Staging data: writes staging (evidence: `dags/superstore_pipeline_sqlite.py`)
- Sales DAG → Dimension builders: registers builders (evidence: `dags/superstore_pipeline_sqlite.py`)
- Dimension builders → Staging data: reads and writes (evidence: `dags/superstore_transformation.py`)
- Dimension builders → Customer dimension: creates (evidence: `dags/superstore_transformation.py`)
- Dimension builders → Product dimension: creates (evidence: `dags/superstore_transformation.py`)
- Dimension builders → Date dimension: creates (evidence: `dags/superstore_transformation.py`)
- Dimension builders → Location dimension: creates (evidence: `dags/superstore_transformation.py`)
- Dimension builders → Sales fact: builds (evidence: `dags/superstore_transformation.py`)
- Customer query → Staging data: queries (evidence: `model/dim_customers.py`)
- Product query → Staging data: queries (evidence: `model/dim_products.py`)
- Date query → Staging data: queries (evidence: `model/dim_dates.py`)
- Location query → Staging data: queries (evidence: `model/dim_location.py`)
- Fact query → Staging data: queries (evidence: `model/fact_sales.py`)
- Staging query → Staging data: queries (evidence: `model/sales_data.py`)
