Skip to content

NUMLDS/430_Final_Nameweee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Commerce Analytics Pipeline

Snowflake + dbt + Streamlit Dashboard

This project implements a complete analytics pipeline for e-commerce transactional data using Snowflake, dbt, and Streamlit.
It transforms raw sales data into analysis-ready tables and visualizes key business insights through an interactive dashboard.


1. Project Overview

The purpose of this project is to design and build a modern analytics engineering workflow that includes:

  1. Loading raw e-commerce data into Snowflake
  2. Cleaning and transforming the data using dbt
  3. Creating business-level summary tables (daily performance & country performance)
  4. Building an interactive Streamlit dashboard inside Snowflake

This reflects real-world data engineering best practices.


2. Project Structure

ecommerce_proj/
│
├── models/
│   ├── staging/
│   │   └── stg_ecommerce.sql
│   ├── clean/
│   │   └── clean_ecommerce.sql
│   └── marts/
│       ├── daily_sales_summary.sql
│       └── country_sales_summary.sql
│
├── streamlit_app.py
├── dbt_project.yml
└── README.md

3. Data Transformation (dbt)

The dbt models follow a three-layer architecture:


3.1 Staging Layer — stg_ecommerce

Purpose:

  • Standardize column names
  • Convert invoice date into proper timestamp
  • Remove cancelled invoice records
  • Prepare clean fields for downstream models

3.2 Clean Layer — clean_ecommerce

Purpose:

  • Create a fully cleaned and structured fact table
  • Compute new business metrics such as total_price
  • Ensure data consistency for reporting and visualization

Key logic:

total_price = quantity * unit_price

3.3 Mart Layer (Business Tables)
daily_sales_summary

Aggregates:

Total sales per day

Order count

Total quantity

Unique customers

Country-level breakdown

Used for time-series analysis.

country_sales_summary

Aggregates:

Total sales per country

Order count

Customer count

Used for market comparison.

4. Streamlit Dashboard

A Streamlit app was deployed inside Snowflake using Snowpark Python.

Dashboard Components: Daily Sales Trend (Line Chart)

Shows how total sales change over time for a selected country.

Country Sales Comparison (Pie Chart)

Displays market share by country.

Eample Transaction Table

Shows detailed transaction records filtered by country.


5. Summary

This project demonstrates a complete data analytics engineering workflow:

Raw → Clean → Modeled → Visualized

Modular dbt transformations

Business-ready dashboards

Scalable and reproducible architecture

The result is a professional analytics pipeline that enables meaningful insights from transactional e-commerce data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors