Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

E-commerce Data Engineering Pipeline - Hands-On Course

Welcome to the comprehensive data engineering course! This project will take you through building a complete, production-ready data pipeline from scratch using modern tools and cloud services.

Course Overview

This hands-on course teaches you to build an end-to-end data engineering pipeline that processes e-commerce data using industry-standard tools. You'll go from raw data to actionable insights while learning best practices used by data engineering teams worldwide.

What You'll Build:

  1. Data Pipeline: Complete ETL process with synthetic e-commerce data
  2. Cloud Integration: AWS S3 data lake for scalable storage
  3. Workflow Orchestration: Professional orchestration with Prefect
  4. Containerization: Production-ready Docker deployment
  5. Data Processing: Advanced transformations and business metrics

Architecture Diagram

πŸ“Š Sample Data    β†’    πŸ“€ S3 Upload    β†’    🧹 Processing    β†’    πŸ“ˆ Metrics    β†’    ☁️ S3 Storage
    (CSV Files)         (Raw Data)         (Transform)        (Analytics)       (Processed)
        ↓                    ↓                  ↓                  ↓                ↓
   Python Scripts    β†’   boto3/S3 API    β†’   Pandas/ETL     β†’   Aggregations  β†’  Data Lake
                                              ↓
                                         πŸ”„ Prefect Flows (Orchestration)
                                              ↓
                                         🐳 Docker Containers (Production)

πŸ› οΈ Technology Stack

Category Technology Purpose
Language Python 3.12 Core development language
Cloud Platform AWS S3 Scalable data lake storage
Orchestration Prefect 3.x Workflow management & monitoring
Data Processing Pandas, Polars Data transformation & analysis
Containerization Docker + Docker Compose Production deployment
Data Validation Great Expectations Data quality assurance
Package Management pip, requirements.txt Dependency management

Project Structure

Hands-On-Project/
β”œβ”€β”€ πŸ“„ .env                              # AWS credentials (create this!)
β”œβ”€β”€ πŸ“Š data/                             # Sample datasets
β”‚   β”œβ”€β”€ raw/                             # Raw CSV files
β”‚   β”œβ”€β”€ customers.csv                    # Customer data
β”‚   β”œβ”€β”€ products.csv                     # Product catalog
β”‚   β”œβ”€β”€ orders.csv                       # Order transactions
β”‚   β”œβ”€β”€ order_items.csv                  # Order line items
β”‚   └── reviews.csv                      # Customer reviews
β”œβ”€β”€ πŸ”§ data-pipeline/                    # Main pipeline code
β”‚   β”œβ”€β”€ πŸ“„ requirements.txt              # Python dependencies
β”‚   β”œβ”€β”€ 🐳 docker-compose.yml            # Container orchestration
β”‚   β”œβ”€β”€ πŸ“‚ src/                          # Source code
β”‚   β”‚   β”œβ”€β”€ data_ingestion/              # S3 upload scripts
β”‚   β”‚   β”‚   └── s3_uploader.py           # Upload data to AWS S3
β”‚   β”‚   β”œβ”€β”€ data_processing/             # ETL transformations
β”‚   β”‚   β”‚   └── etl_processor.py         # Clean & transform data
β”‚   β”‚   └── orchestration/               # Workflow management
β”‚   β”‚       └── prefect_flows.py         # Prefect orchestration
β”‚   β”œβ”€β”€ πŸ“‚ config/                       # Configuration files
β”‚   β”‚   β”œβ”€β”€ aws_config.yaml              # AWS settings
β”‚   β”‚   β”œβ”€β”€ prefect_config.yaml          # Prefect configuration
β”‚   β”‚   └── data_schemas.yaml            # Data validation rules
β”‚   β”œβ”€β”€ πŸ“‚ infrastructure/               # Container infrastructure
β”‚   β”‚   └── docker/
β”‚   β”‚       └── Dockerfile               # Container build instructions
β”‚   └── πŸ“‚ tests/                        # Test files
β”‚       └── test_aws_connection.py       # AWS connectivity tests
└── πŸ“š CONTAINERIZATION_GUIDE.md         # Complete Docker guide

Quick Start Guide

Prerequisites Checklist

  • Python 3.10+ installed (recommended: 3.12)
  • AWS Account with S3 access
  • Docker Desktop installed and running
  • Git for version control
  • Text Editor (VS Code recommended)

Step 1: Environment Setup

  1. Clone/Download the project

    cd "D:\Hands-On-Project"
  2. Create virtual environment

    python -m venv venv
    venv\Scripts\activate  # Windows
  3. Install dependencies

    cd data-pipeline
    pip install -r requirements.txt
  4. Configure AWS credentials Create .env file in project root:

    AWS_ACCESS_KEY_ID=your_access_key_here
    AWS_SECRET_ACCESS_KEY=your_secret_key_here
    AWS_DEFAULT_REGION=us-east-1
    AWS_S3_BUCKET_NAME=your-unique-bucket-name

πŸ”§ Step 2: Test Your Setup

  1. Test AWS connection

    python tests/test_aws_connection.py

    βœ… Should show: "Connection successful!"

  2. Extract sample data

    # Data should already be extracted in data/raw/ folder
    ls ../data/raw/  # Should show 5 CSV files

πŸ“€ Step 3: Run Data Pipeline (Local)

  1. Upload raw data to S3

    python src/data_ingestion/s3_uploader.py

    βœ… Should upload 5 CSV files to S3

  2. Process data

    python src/data_processing/etl_processor.py

    βœ… Should clean data and create business metrics

  3. Run orchestrated pipeline

    python src/orchestration/prefect_flows.py

    βœ… Should show complete pipeline execution

πŸ”„ Step 4: Prefect Orchestration

  1. Start Prefect server

    prefect server start
  2. Access Prefect UI Open: http://localhost:4200 βœ… Should show Prefect dashboard

  3. View pipeline execution

    • See flow runs, tasks, and logs
    • Monitor performance and errors

🐳 Step 5: Containerization (Production)

  1. Build and start containers

    cd "D:\Hands-On-Project"
    docker-compose -f data-pipeline/docker-compose.yml up --build -d
  2. Run containerized pipeline

    docker exec -it data-pipeline-data-pipeline-1 python data-pipeline/src/orchestration/prefect_flows.py
  3. Access containerized Prefect UI Open: http://localhost:4200 βœ… Should show pipeline execution in containers

πŸ“Š What You'll Learn

Module 1: Data Pipeline Fundamentals

  • βœ… ETL vs ELT patterns
  • βœ… Data lake architecture
  • βœ… Batch processing concepts
  • βœ… Error handling strategies

Module 2: Cloud Data Engineering

  • βœ… AWS S3 data lake setup
  • βœ… IAM permissions and security
  • βœ… Data partitioning strategies
  • βœ… Cost optimization techniques

Module 3: Workflow Orchestration

  • βœ… Prefect flow design
  • βœ… Task dependencies
  • βœ… Scheduling and triggers
  • βœ… Monitoring and alerting

Module 4: Production Deployment

  • βœ… Docker containerization
  • βœ… Multi-service architecture
  • βœ… Environment management
  • βœ… Scaling strategies

Module 5: Data Quality & Testing

  • βœ… Data validation patterns
  • βœ… Unit testing for data pipelines
  • βœ… Great Expectations framework
  • βœ… Pipeline monitoring

Sample Data Overview

Your pipeline processes realistic e-commerce data:

Dataset Records Description
customers.csv 1,000+ Customer profiles, demographics
products.csv 500+ Product catalog, categories, pricing
orders.csv 2,000+ Order transactions, timestamps
order_items.csv 6,000+ Individual items per order
reviews.csv 1,500+ Customer reviews and ratings

πŸ”§ Troubleshooting Guide

Common Issues:

❌ "AWS credentials not found"

  • Solution: Create .env file with valid AWS credentials
  • Check: File is in project root, not inside data-pipeline folder

❌ "Docker daemon not running"

  • Solution: Start Docker Desktop application
  • Check: Docker icon in system tray shows running status

❌ "Can't connect to Prefect server"

❌ "Python module not found"

  • Solution: Activate virtual environment and reinstall requirements
  • Check: pip list shows all required packages

Project Completion

By the end of this course, you'll have built:

βœ… Production-ready data pipeline processing real e-commerce data
βœ… Cloud-based data lake on AWS S3
βœ… Professional orchestration with Prefect monitoring
βœ… Containerized deployment ready for any environment
βœ… Comprehensive understanding of modern data engineering

Next Steps & Career Path

After completing this project:

  1. Add to your portfolio - Showcase on GitHub and LinkedIn
  2. Extend functionality - Add real-time streaming, machine learning
  3. Learn advanced tools - Apache Airflow, dbt, Snowflake
  4. Apply for roles - Data Engineer, Analytics Engineer, Platform Engineer

Support & Resources

  • Full Documentation: See CONTAINERIZATION_GUIDE.md
  • Issues: Check troubleshooting section above
  • Questions: Review code comments and documentation
  • Best Practices: Follow the patterns in provided code

🎯 Ready to become a data engineer? Let's build something amazing! πŸš€

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages