How thecountt/data-modeling-with-postgres works
Sparkify is a local ETL pipeline that turns song metadata and streaming activity JSON into a SQLite star schema for song-play analysis. The main workflow initializes tables, loads song and artist dimensions, then filters NextSong events to populate time, user, and songplays records; songplays lookup resolves song and artist IDs from the loaded catalog. README documents these schema capabilities and historical subscription-level capture. Source excerpts show SQLite implementations despite README references to Postgres; unsampled analysis tooling is excluded.
Main entry points: etl.py Activity event loader · main.py Pipeline runner · create_tables.py Table setup · sql_queries.py Songs dimension
Components 10
Database setup
- Table setup
create_tables.py
ETL processing
- Song metadata loader
etl.py - Activity event loader
etl.py
Analytics schema
- Schema and SQL
sql_queries.py - Songplays fact
sql_queries.py - Users dimension
sql_queries.py - Songs dimension
sql_queries.py - Artists dimension
sql_queries.py - Time dimension
sql_queries.py
Other components
- Pipeline runner
main.py
Connections 10
- Pipeline runner → Table setup: runs first
main.py - Pipeline runner → Activity event loader: runs next
main.py - Table setup → Schema and SQL: executes schema SQL
create_tables.py - Song metadata loader → Songs dimension: inserts songs
etl.py - Song metadata loader → Artists dimension: inserts artists
etl.py - Activity event loader → Time dimension: inserts timestamps
etl.py - Activity event loader → Users dimension: upserts users
etl.py - Activity event loader → Songs dimension: looks up matches
etl.py - Activity event loader → Artists dimension: looks up matches
etl.py - Activity event loader → Songplays fact: inserts plays
etl.py