Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AWS PySpark Data Engineering Pipeline

AWS PySpark Apache Spark Python GitHub Parquet

An end-to-end AWS Data Engineering pipeline built using Amazon S3, Apache Spark, and PySpark following the Medallion Architecture (Bronze β†’ Silver β†’ Gold).

This project demonstrates how to build a scalable cloud-based data lake by ingesting raw e-commerce data into Amazon S3, transforming it with PySpark, implementing incremental loading, and creating analytics-ready datasets.


πŸ“Œ Project Overview

This project simulates a real-world e-commerce data platform where customer, product, and order datasets are processed through a complete ETL pipeline.

The pipeline:

  • Stores raw data in Amazon S3 (Bronze layer)
  • Cleans and transforms data using PySpark
  • Stores processed data as Parquet files (Silver layer)
  • Performs incremental loading to process only new records
  • Creates business-ready Gold layer analytics tables

This project demonstrates practical Data Engineering concepts including:

  • Data Lake Architecture
  • ETL Pipeline Development
  • PySpark Transformations
  • Incremental Data Processing
  • Data Modeling
  • Analytics Data Preparation

πŸ—οΈ Architecture

Architecture


πŸ”„ Pipeline Flow

                 Source CSV Files
                        β”‚
                        β–Ό
                  Amazon S3 Bucket
                        β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                               β–Ό
   Bronze Layer                  Raw CSV Files
        β”‚
        β–Ό
PySpark Transformations
        β”‚
        β–Ό
   Silver Layer
(Clean Parquet Files)
        β”‚
        β–Ό
Incremental Loading
(left_anti Join)
        β”‚
        β–Ό
    Gold Layer
        β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β–Ό      β–Ό         β–Ό
Customer Daily   Product
Summary  Sales   Performance

βš™οΈ Technology Stack

Technology Purpose
Amazon S3 Cloud Data Lake Storage
Apache Spark Distributed Data Processing
PySpark ETL Development
Python Data Processing
Parquet Optimized Storage Format
SQL Analytics & Validation
Git & GitHub Version Control

πŸ“‚ Repository Structure

aws-data-engineering-project
β”‚
β”œβ”€β”€ architecture/
β”‚
β”œβ”€β”€ data/
β”‚
β”œβ”€β”€ docs/
β”‚
β”œβ”€β”€ notebooks/
β”‚
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ bronze_ingestion.py
β”‚   β”œβ”€β”€ silver_transformation.py
β”‚   β”œβ”€β”€ incremental_load.py
β”‚   └── gold_transformation.py
β”‚
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
└── .gitignore

πŸ₯‰ Bronze Layer

The Bronze layer stores raw source data exactly as received.

Datasets

  • Customers
  • Products
  • Orders

Implemented

  • Raw CSV ingestion
  • Amazon S3 storage
  • Source data organization

Example:

bronze/
β”œβ”€β”€ customers/
β”œβ”€β”€ products/
└── orders/

πŸ₯ˆ Silver Layer

The Silver layer contains cleaned and transformed datasets.

Transformations

  • Schema validation
  • Data cleaning
  • Null handling
  • Data type conversion
  • Duplicate removal
  • Standardization

Storage Format

  • Parquet

Example:

silver/
β”œβ”€β”€ customers/
β”œβ”€β”€ products/
└── orders/

πŸ”„ Incremental Loading

Instead of processing the entire dataset every time, the pipeline processes only newly arrived records.

Implementation:

  • Read existing Silver data
  • Read new Bronze data
  • Compare records using order_id
  • Identify new records using Spark left_anti join
  • Append only new records to the Silver layer

Benefits:

  • Faster processing
  • Prevents duplicate records
  • Production-style ETL workflow

πŸ₯‡ Gold Layer

The Gold layer contains business-ready datasets for reporting and analytics.

Customer Sales Summary

Provides:

  • Total Orders
  • Total Quantity Purchased
  • Total Sales

Daily Sales Summary

Provides:

  • Daily Orders
  • Daily Quantity Sold
  • Daily Revenue

Product Performance

Provides:

  • Product Revenue
  • Quantity Sold
  • Product Rankings

βœ… Features

  • Medallion Architecture (Bronze β†’ Silver β†’ Gold)
  • AWS S3 Data Lake
  • PySpark ETL Pipeline
  • Incremental Data Loading
  • Duplicate Prevention
  • Parquet Storage
  • Business Analytics Tables
  • Production-inspired Project Structure
  • Git Version Control

πŸ“Š Sample Dataset

Synthetic e-commerce datasets containing:

  • 100 Customers
  • 10 Products
  • 500+ Orders

Additional order records are used to demonstrate incremental loading.


▢️ How to Run

Clone the repository

git clone https://github.com/anshu02042002/aws-data-engineering-project.git

πŸ“Έ Project Screenshots

AWS S3 Data Lake

The project stores raw, cleaned, and analytics-ready datasets in Amazon S3 following the Medallion Architecture.

AWS S3 Bucket


Incremental Loading

The pipeline processes only new records using a left_anti join, preventing duplicate data from being loaded into the Silver layer.

Incremental Loading

Install dependencies

pip install -r requirements.txt

Configure AWS credentials

Ensure your AWS credentials are configured locally.

Run the scripts

bronze_ingestion.py
        ↓
silver_transformation.py
        ↓
incremental_load.py
        ↓
gold_transformation.py

πŸ‘¨β€πŸ’» Author

Anshu Gupta

Aspiring Data Engineer passionate about building scalable cloud data pipelines using AWS and Apache Spark.

Connect with Me


πŸ› οΈ Skills Demonstrated

  • Python
  • SQL
  • Apache Spark
  • PySpark
  • AWS S3
  • ETL Pipeline Development
  • Incremental Data Loading
  • Data Lake Architecture
  • Parquet
  • Git & GitHub

About

End-to-end AWS Data Engineering Pipeline using Amazon S3, PySpark, Apache Spark, Parquet, and Incremental Loading.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages