How coding-for-it/retail_sales_analytics_dashboard works
This repository is a retail-sales ETL and analytics product. Its primary workflow extracts customer, product, and order CSVs; validates and transforms records; writes clean and rejected outputs; and optionally loads data and run metadata into Snowflake. SQL analytics and a Power BI DirectQuery dashboard form the reporting branch. The orchestration and core transformation calls are visible in excerpts; validation, loading, logging, and reporting details are partly documented in the README, so those links rely on that documentation rather than unsampled implementation.
Main entry points: main.py Pipeline orchestration · load.py Warehouse loading · extract.py CSV extraction · analysis_queries.sql SQL analytics
Components 19
ETL Pipeline
- Pipeline orchestration
src/main.py - CSV extraction
src/extract.py - Data validation
src/validate.py - Data transformation
src/transform.py - Clean CSV outputs
cleaned - Rejected CSV outputs
rejected - Run summary
src/utils.py - Pipeline logging
src/logger.py - ETL configuration
src/config.py
Warehouse & Analytics
- Snowflake connection
src/db.py - Warehouse loading
src/load.py - Snowflake warehouse
- Warehouse schema
sql/retail_db_setup.sql - SQL ETL definitions
sql/py_etl.sql - SQL analytics
sql/analysis_queries.sql - Analytics views
sql/analytics.sql
Business Intelligence
- Power BI dashboard
powerbi/PowerBI Dashboard.pbix
Other components
- Pipeline operator
- Raw CSV sources
data
Connections 21
- Pipeline operator → Pipeline orchestration: runs
README.md - Pipeline orchestration → CSV extraction: calls extraction
src/main.py - Raw CSV sources → CSV extraction: reads CSVs
src/extract.py - Pipeline orchestration → Data validation: calls validation
src/main.py - Pipeline orchestration → Data transformation: calls transforms
src/main.py - Pipeline orchestration → Clean CSV outputs: writes clean data
README.md - Pipeline orchestration → Rejected CSV outputs: writes rejects
README.md - Pipeline orchestration → Warehouse loading: calls loading
src/main.py - Pipeline orchestration → Snowflake connection: gets connection
src/main.py - Pipeline orchestration → Run summary: generates summary
src/main.py - Pipeline orchestration → Pipeline logging: logs run
src/main.py - CSV extraction → ETL configuration: uses input paths
src/extract.py - Data transformation → ETL configuration: uses state map
src/transform.py - Warehouse loading → Snowflake warehouse: loads records
README.md - Warehouse loading → Snowflake warehouse: writes audit rows
README.md - Warehouse schema → Snowflake warehouse: defines schema
README.md - SQL ETL definitions → Snowflake warehouse: supports ETL
- SQL analytics → Snowflake warehouse: queries warehouse
README.md - Analytics views → Snowflake warehouse: defines views
README.md - Power BI dashboard → Snowflake warehouse: DirectQuery reporting
README.md - SQL analytics → Power BI dashboard: supplies insights