A startup called Sparkify wants to analyze the data they've been collecting on songs and user activity on their new music streaming app. The analysis team is particularly interested in understanding what songs users are listening to. Currently, there is no easy way to query the data to generate the results, since the data reside in a directory of CSV files on user activity on the app. I will create an Apache Cassandra database which can create queries on song play data to answer the questions by crationg database for this analysis. and testing the database by running queries given by the analytics team from Sparkify to create the results.
Project_1B_ Project_Template.ipynbThe code file.
- Design tables to answer exact the queries.
- Write Apache Cassandra
CREATE KEYSPACEandSET KEYSPACEstatements. - Develop the
CREATEstatement for each of the tables to address each question. - Load the data with
INSERTstatement for each of the tables. - Test by running the proper select statements with the correct
WHEREclause.
- Implement the logic to iterate through each event file in
event_datato process and create a new CSV file in Python. - Include Apache Cassandra
CREATEandINSERTstatements to load processed records into relevant tables in the data model. - Test by running
SELECTstatements after running the queries on the database.
- Give me the artist, song title and song's length in the music app history that was heard during sessionId = 338, and itemInSession = 4
- Give me only the following: name of artist, song (sorted by itemInSession) and user (first and last name) for userid = 10, sessionid = 182
- Give me every user name (first and last) in my music app history who listened to the song 'All Hands Against His Own'