Skip to content

Data modeling with Cassandra, building Data Warehouse using Redshift and creation of Data Lake using Spark and Airflow

Notifications You must be signed in to change notification settings

bdnf/BigData-Engineering-Projects

Repository files navigation

Large scale Data Engineering projects

Current project shows steps for analyzing the data for a hypothetical startup collecting songs and user activity from the new music streaming app they have created.

Given this hypothetical startup, their analytics team is particularly interested in understanding what songs users are listening to. Currently, they don't have an easy way to query their data, which resides in a directory of JSON logs on user activity on the app, as well as a directory with JSON metadata on the songs in their app.

Technologies:


Python as main programming language
AWS Redshift
AWS S3
Apache Airflow
Apache Cassandra
PostreSQL
Spark and Spark on EMR cluster
Docker

Each project uses the same dataset and provides end-to-end use-cases on how the data can be managed and scaled based on requirements.
Data scale is gradually increases from first project to the last.
Use navigation, or provided links, to learn more about each project. Corresponding README files included.
The repository contains the following projects:

Developed a relational database using PostgreSQL to model user activity data for a music streaming app.

Developed a Star Schema, Fact and Dimension tables for storing and retrieving the data. Built out an ETL pipeline to optimize queries in order to understand what songs users listen to.

Designed a NoSQL database using Apache Cassandra based on the original schema outlined in project above.

Develop an ETL Pipeline that copies data from S3 buckets into staging tables, processed into a optimized Star Schema and loaded to Redshift cluster for storage and further large-scale analytics.

Project extends previous one and shows how to scale the current ETL pipeline by moving the data into Data Lake. Further data can be used by Redshift directly or using AWS Glue/Athena for running ad-hoc queries.

Scalable ETL Pipeline is implemented on a Spark EMR cluster. Processed data is partitioned and saved in S3 in Parquet format.

Project describes how to automate ETL pipelines using Airflow. Custom operators examples on how to perform tasks such as staging data, processing and loading into AWS Redshift, and validation through data quality checks were provided.

Datasets

Songs dataset (generated)

Song Dataset contains over one million of JSON files.
Each file is in JSON format and contains metadata about a song and the artist of that song.
The files are partitioned by the first three letters of each song's track ID.
For example, here are filepaths to two files in this dataset.

song_data/A/B/C/TRABCEI128F424C983.json
song_data/A/A/B/TRAABJL12903CDCF1A.json

And below is an example of what a single song file, TRAABJL12903CDCF1A.json, looks like.

{
    "num_songs": 1,
    "artist_id": "ARJIE2Y1187B994AB7",
    "artist_latitude": null,
    "artist_longitude": null,
    "artist_location": "",
    "artist_name": "Line Renaud",
    "song_id": "ABCPIRU12A6D4FA1E1",
    "title": "Der Kleine Dompfaff",
    "duration": 152.92036,
    "year": 0
}

Log dataset

The second dataset consists of log files in JSON format generated by this event simulator based on the songs in the dataset above. These simulate activity logs from a music streaming app based on specified configurations.

The log files in the dataset you'll be working with are partitioned by year and month. For example, here are filepaths to two files in this dataset.

log_data/2018/11/2018-11-12-events.json
log_data/2018/11/2018-11-13-events.json

About

Data modeling with Cassandra, building Data Warehouse using Redshift and creation of Data Lake using Spark and Airflow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published