For this project, we created a music streaming data warehouse and ETL pipeline using S3, Redshift, and Python. We began by using Python to extracting user listening and song metadata JSON files from S3 buckets so that it could be staged within Redshift. Once staged, we transformed the data so it may be stored in dimension tables for future analytics.
- create_tables.py - Script drops any extraneous tables and adds new tables.
- etl.py - Script copies data to staging tables and inserts transformed data into dimension tables
- sql_queries.py - Script stores SQL queries for Redshift.
-
Create an AWS Redshift Cluster (dc2.large - 4 Nodes) and add the required login credentials to the dwh.cfg file.
-
Type run create_tables.py in your terminal to drop any extraneous tables and to add new tables to the cluster.
-
Type run etl.py in your terminal to copy the data from S3 into your staging tables which will then transform and insert the data into the dimension tables.