How praveen0095/ecommerce-retention-analysis works
This repository describes an e-commerce retention analytics pipeline: raw transaction data is cleaned and feature-engineered with PySpark, staged in cloud storage and Snowflake, modeled with dbt, and consumed in Power BI for retention insights. The graph preserves the documented staging and mart layers and the repository’s named SQL analyses. Most SQL and dbt model contents were not provided, so their internal behavior and relationships beyond the README’s documented flow are not inferred.
Main entry points: pyspark_data_trans.py PySpark Cleaning · staging dbt Staging Models · customer_retention.sql Retention Mart · warehouse_setup.sql Warehouse Setup
Components 17
Data Processing
- PySpark Cleaning
scripts/pyspark_data_trans.py - Parquet Data Lake
Warehouse and Modeling
- Snowflake Warehouse
- Warehouse Setup
Snowflake/warehouse_setup.sql - dbt Staging Models
dbt/models/staging - Churn Staging
dbt/models/staging/stg_churn_segment.sql - Cohort Staging
dbt/models/staging/stg_cohort_24M.sql - Customer Staging
dbt/models/staging/stg_customer_seg.sql - RFM Staging
dbt/models/staging/stg_rfm_analysis.sql - Retention Mart
dbt/models/marts/customer_retention.sql
Retention Analytics
- Churn Analysis
Snowflake/analysis/churn_analysis.sql - 24-Month Cohort Analysis
Snowflake/analysis/cohort_24M.sql - Customer Segmentation
Snowflake/analysis/customer_segment.sql - RFM Analysis
Snowflake/analysis/rfm_analysis.sql
Insights and Reporting
- Power BI Dashboards
- Retention Decisions
Other components
- Raw CSV Data
Connections 8
- Raw CSV Data → PySpark Cleaning: ingests
README.md - PySpark Cleaning → Parquet Data Lake: writes Parquet
README.md - Parquet Data Lake → Snowflake Warehouse: loads Parquet
README.md - Warehouse Setup → Snowflake Warehouse: configures loading
README.md - Snowflake Warehouse → dbt Staging Models: provides source data
README.md - dbt Staging Models → Retention Mart: models marts
README.md - Retention Mart → Power BI Dashboards: feeds dashboards
README.md - Power BI Dashboards → Retention Decisions: supports decisions
README.md