# prabhat-singh05/de_project_batch_process architecture

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

- Interactive diagram: https://gitdiagram.com/prabhat-singh05/de_project_batch_process
- Repository: https://github.com/prabhat-singh05/de_project_batch_process

## Overview

This repository implements a scheduled batch pipeline for the bank transaction CSV: Airflow coordinates upload to S3, download, Kafka publishing, and PostgreSQL loading; dbt then builds a transformed table. The DAG code shows that the PostgreSQL load reads the downloaded CSV directly, not from Kafka, and no Kafka consumer is present in the tree. dbt’s transformation is documented, but its SQL was not sampled, so that relationship is based on the README.

Main entry points: [`dags/etl_pipeline.py`](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dags/etl_pipeline.py) (ETL DAG), [`dbt_transform/models/transform/transform_data_table.sql`](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dbt_transform/models/transform/transform_data_table.sql) (Transform model), [`data/bankdataset.csv`](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/data/bankdataset.csv) (Bank CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_orchestration["Orchestration"]
  node_airflow["Airflow"]
  node_dag["ETL DAG<br/>[etl_pipeline.py]"]
end

subgraph group_ingestion["Ingestion"]
  node_csv["Bank CSV<br/>[bankdataset.csv]"]
  node_s3[("AWS S3")]
  node_kafka["Kafka topic"]
end

subgraph group_storage_transform["Storage &amp; Transform"]
  node_postgres[("PostgreSQL")]
  node_dbt_model["Transform model"]
end

node_operator(("Pipeline operator"))

node_operator -->|"triggers DAG"| node_airflow
node_airflow -->|"runs"| node_dag
node_dag -->|"reads"| node_csv
node_dag -->|"uploads"| node_s3
node_dag -->|"downloads"| node_s3
node_dag -->|"publishes lines"| node_kafka
node_dag -->|"loads CSV"| node_postgres
node_postgres -->|"transforms raw table"| node_dbt_model
node_dbt_model -->|"builds table"| node_postgres

click node_dag "https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dags/etl_pipeline.py"
click node_csv "https://github.com/prabhat-singh05/de_project_batch_process/blob/main/data/bankdataset.csv"
click node_dbt_model "https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dbt_transform/models/transform/transform_data_table.sql"

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_airflow,node_dag toneBlue
class node_csv,node_s3,node_kafka toneAmber
class node_postgres,node_dbt_model toneMint
class node_operator toneIndigo
```

## Components

### Orchestration

- **Airflow**
- [ETL DAG](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dags/etl_pipeline.py): `dags/etl_pipeline.py`

### Ingestion

- [Bank CSV](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/data/bankdataset.csv): `data/bankdataset.csv`
- **AWS S3**
- **Kafka topic**

### Storage & Transform

- **PostgreSQL**
- [Transform model](https://github.com/prabhat-singh05/de_project_batch_process/blob/main/dbt_transform/models/transform/transform_data_table.sql): `dbt_transform/models/transform/transform_data_table.sql`

### Other components

- **Pipeline operator**

## Connections

- Pipeline operator → Airflow: triggers DAG (evidence: `README.md`)
- Airflow → ETL DAG: runs (evidence: `README.md`)
- ETL DAG → Bank CSV: reads (evidence: `dags/etl_pipeline.py`)
- ETL DAG → AWS S3: uploads (evidence: `dags/etl_pipeline.py`)
- ETL DAG → AWS S3: downloads (evidence: `dags/etl_pipeline.py`)
- ETL DAG → Kafka topic: publishes lines (evidence: `dags/etl_pipeline.py`)
- ETL DAG → PostgreSQL: loads CSV (evidence: `dags/etl_pipeline.py`)
- PostgreSQL → Transform model: transforms raw table (evidence: `README.md`)
- Transform model → PostgreSQL: builds table (evidence: `README.md`)
