How imfc12/shot-data-warehouse works
Project type and purpose
• This is a Python-MySQL ETL/data-warehouse pipeline that extracts NBA shot data via the nba_api, stages it, and loads it into an OLAP-ready star schema in MySQL.
File structure
• Top-level script: main.py, which drives the full pipeline.
• ETL/ directory: contains four Python modules—
• reference_data.py (loads reference tables)
• staging_data.py (extracts & stages shot data)
• staging_utils.py (helpers: month/clutch mapping, DB connections)
• orchestrate_load.py (runs stored procedures to move data from staging to star schema)
• SQL/ directory: DDL/DML scripts to define and populate database objects—
• star_schema.sql (dimension & fact table definitions)
• staging_table.sql (staging table)
• reference_tables.sql (ref_teams, ref_players)
• retrieve_team_proc.sql (stored proc to get teams/players)
• load_procedures.sql (stored procs to move staging→star schema)
• Docs/: mapping between staging & star schema, and project journal
README for additional insights
• Confirms a star schema consisting of five dimension tables and one fact table
• Describes pipeline steps and sequencing in main.py
• Notes external dependency: nba_api
• Mentions environment setup (.env for DB creds, pip requirements)