Giter Club home page Giter Club logo

sparkifyredshift's Introduction

Sparkify is a startup company who provides music streaming services. They have JSON metadata on the songs in their app and user activity data in Amazon S3. The analytics team in Sparkify is interested in understanding what songs users are listening to.

Purpose

To build a ETL pipeline for extracting data from s3, stage them on Redshift and transform them into dimensional tables for song play analysis.

Star schema design

Fact Table

songplays

  • songplay_id (primary key), start_time (foreign key), user_id (foreign key), level, song_id (foreign key), artist_id (foreign key), session_id, location, user_agent

Dimension Tables

users

  • user_id (primary key), first_name, last_name, gender, level

songs

  • song_id (primary key), title, artist_id (foreign key), year, duration

artists

  • artist_id (primary key), name, location, latitude, longitude

time

  • start_time (primary key), hour, day, week, month, year, weekday

Usage

  1. Create a Redshift cluster and update config.ini with your own credentials

  2. Create the tables in your Redshift database by running following command in your terminal

python creat_tables.py

  1. Stage, tranform and load the data to your Redshift database by running following command

python etl.py

  1. Check whether the tables are loaded correctly by running following command

python test_tables.py

Credits

The codes are written by me and the sparkify data belongs to Udacity.

sparkifyredshift's People

Contributors

guli-y avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.