End-to-End Banking Data Engineering Pipeline
Click an image to zoom.
Overview
This project demonstrates an end-to-end Banking Data Engineering Pipeline that captures banking transactions and operational data from PostgreSQL using Debezium Change Data Capture (CDC) and Apache Kafka. The source database contains customers, accounts, transfers, and ledger transactions, with Python scripts generating initial and continuous banking activity. Debezium captures database changes and publishes them to Kafka topics, where a Python consumer processes the events and stores them as raw files in MinIO Object Storage. The raw data is then ingested into Snowflake, where dbt builds staging, intermediate, and mart models, including customer and account dimensions, transaction fact tables, and daily banking KPIs. Apache Airflow orchestrates the batch ingestion and transformation workflow, while Docker Compose manages the local infrastructure. Finally, GitHub Actions automates CI checks for Python syntax and dbt project validation.
Key Features
- End-to-End Data Engineering Pipeline: Built an integrated pipeline covering relational data generation, CDC, message streaming, object storage, cloud data warehousing, transformations, and orchestration.
- Banking Data Simulation: Used Python scripts to generate customers, accounts, and initial transfers, alongside continuous banking activity to simulate ongoing transactions.
- Transactional Source Database: Used PostgreSQL as the source of truth, leveraging database transactions and constraints to maintain ACID properties and data integrity.
- Change Data Capture (CDC): Integrated Debezium with PostgreSQL logical replication to capture inserts, updates, and deletes from selected banking tables without repeatedly querying the source database.
- Kafka-Based Streaming Ingestion: Used Apache Kafka in KRaft mode to publish and consume CDC events through dedicated topics for banking entities.
- Python Kafka Consumer: Developed a Python consumer to process CDC events and persist raw data files, while using Kafka consumer offsets to maintain ingestion progress and avoid reprocessing acknowledged messages.
- Object Storage with MinIO: Stored raw CDC events in MinIO, organized using time-based partitions to provide a structured landing layer before warehouse ingestion.
- Snowflake Data Warehouse: Loaded raw banking events from MinIO into Snowflake, using a dedicated RAW schema as the foundation for downstream transformations.
- dbt Transformation Layers: Developed a dbt project with staging, intermediate, and mart layers to transform raw CDC data into structured, analytics-ready models.
- Dimensional Data Modeling: Built customer, account, and date dimensions alongside transfer and ledger transaction fact tables to support analytical reporting.
- Banking KPIs and Aggregations: Created daily banking KPI models to provide aggregated insights into transaction activity and banking operations.
- Data Quality Testing: Implemented dbt schema and data tests, including uniqueness, not-null, accepted-values, and relationship checks. The project includes 56 dbt tests across its models.
- Airflow Orchestration: Developed an Apache Airflow DAG to automate MinIO-to-Snowflake ingestion, dbt model execution, and data quality testing on a scheduled workflow.
- Dockerized Infrastructure: Containerized the local environment using Docker Compose, integrating PostgreSQL, Kafka, Debezium, MinIO, and Airflow with resource-conscious configurations.
- CI with GitHub Actions: Implemented a CI workflow that automatically checks Python syntax and validates the dbt project using Dockerized dbt commands, including dependency installation and project parsing.
- Reproducible and Documented Project: Organized the codebase, configuration examples, architecture diagram, Airflow DAG screenshots, and dbt lineage documentation to make the project easier to understand and run.