Skip to content

vinitvajani/DeltaFlow-Incremental-Data-Processing-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeltaFlow – Incremental Data Processing Framework

Production-Style PySpark ETL Pipeline with Incremental Loading, Historical Tracking Foundations (SCD) and Audit Monitoring.


Project Overview

DeltaFlow is a data engineering project designed to demonstrate how production ETL pipelines avoid duplicate processing while maintaining reliable, repeatable data loads.

The framework extracts user data from a paginated REST API, applies data quality transformations using PySpark, identifies new records through incremental loading logic, stores analytics-ready datasets in partitioned Parquet format and generates audit logs for operational monitoring.

Unlike traditional full-refresh pipelines, DeltaFlow processes only newly arriving records, reducing unnecessary computation and making pipeline reruns safe.


Business Problem

In many data platforms, source systems are refreshed continuously while ETL pipelines run on schedules.

Reprocessing the same records on every execution can:

  • Create duplicate data
  • Increase processing costs
  • Slow downstream analytics
  • Reduce trust in reporting systems

DeltaFlow addresses this problem by implementing incremental data loading using Left Anti Join logic, ensuring that only unseen records are loaded into the curated layer.


Architecture

The framework follows a production-inspired ETL architecture commonly used in modern data engineering workflows.

DeltaFlow Architecture

Pipeline Flow

DummyJSON Users API

→ Raw Landing Zone (JSON)

→ PySpark Data Quality Layer

→ Incremental Loading Engine

→ Curated Parquet Storage

→ Audit & Monitoring Layer

The design focuses on reliability, rerun safety, data quality and operational visibility.


Key Features

API Data Ingestion

  • REST API extraction
  • Pagination using limit and skip parameters
  • Retry mechanism with exponential backoff
  • Raw JSON landing file generation

Data Quality Processing

  • Schema projection
  • Null handling
  • Deduplication
  • Data standardization
  • Invalid record filtering

Incremental Loading

  • User-level duplicate detection
  • Left Anti Join implementation
  • New records only processing
  • Rerun-safe architecture

Curated Storage

  • Analytics-ready Parquet datasets
  • Partitioned by state
  • Optimized storage layout

Audit Monitoring

Every execution generates operational metrics including:

  • Rows extracted
  • Rows cleaned
  • New rows loaded
  • Execution timestamp

Tech Stack

Languages

  • Python
  • SQL

Data Processing

  • PySpark

Storage

  • JSON
  • Parquet

Engineering Practices

  • Incremental Loading
  • Data Quality Validation
  • Audit Logging

Version Control

  • Git
  • GitHub

Project Structure

deltaflow/
│
├── screenshots/
│   ├── initial_pipeline_run.png
│   ├── incremental_run.png
│   └── audit_logs.png
│
├── output/
│   ├── users_cleaned/
│   └── audit_logs.csv
│
├── architecture.png
├── users_raw.json
├── DE_project.py
├── README.md
└── .gitignore

Pipeline Execution

Initial Pipeline Run

The first execution extracts records from the API, applies transformations and loads all valid records into the curated Parquet layer.

Initial Pipeline Run


Incremental Pipeline Run

On subsequent executions, DeltaFlow identifies previously processed records and loads only new data.

This prevents duplicate inserts and keeps the curated layer clean.

Incremental Pipeline Run


Audit Monitoring

Pipeline execution metrics are automatically captured for every run.

The audit framework tracks operational statistics and provides visibility into pipeline performance.

Audit Logs


Sample Metrics

Metric Value
Records Extracted 208
Records Cleaned 208
Incremental Logic Left Anti Join
Storage Format Parquet
Partition Strategy State-Based
Audit Logging Enabled

Future Enhancements

Planned DeltaFlow v2 improvements:

  • SCD Type 2 historical tracking
  • Active / Inactive record versioning
  • Apache Airflow orchestration
  • AWS S3 Data Lake integration
  • AWS Glue ETL deployment
  • Athena analytics layer
  • Redshift warehouse integration
  • Data quality monitoring with Great Expectations

Key Learnings

Through this project I gained hands-on experience with:

  • API-based ingestion pipelines
  • Incremental ETL design patterns
  • Data cleansing with PySpark
  • Partitioned Parquet storage
  • Audit logging frameworks
  • Production-style pipeline development
  • Rerun-safe data processing architectures

Why This Project Matters

DeltaFlow demonstrates core data engineering concepts commonly used in production environments:

  • Incremental data processing
  • ETL pipeline development
  • Data quality enforcement
  • Operational monitoring
  • Analytics-ready storage design

The project serves as a foundation for larger-scale cloud implementations involving Airflow, AWS Glue, S3, Athena and Redshift.


Author

Vinit Vajani

Data Engineer | AWS | PySpark | SQL | ETL Pipelines

LinkedIn: https://www.linkedin.com/in/vinit-vajani-8672b8208/

GitHub: https://github.com/vinitvajani

About

End-to-end PySpark ETL pipeline with incremental loading, partitioned Parquet storage and audit logging for production-style data processing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages