Coder Social home page Coder Social logo

data_lakes_with_spark's Introduction

Data Lakes with Spark

This is the forth project of Udacity's Data Engineering Nanodegree๐ŸŽ“.
The purpose is to build an ETL pipeline that extracts data from S3, processes them using Spark, and load the data back into S3(or hdfs) as a set of dimensional tables.

Background

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 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.

File Description

  • etl.py loads data from S3, process that data usign Spark, and writes them back to S3(or hdfs).
  • sample_parquet_data.ipynb is a notebook to show sample data of each table in parquet file.

Database Schema

ERD

tablename tbl_rows sortkey1 diststyle
artists 9553 artist_id ALL
songplays 309 start_time KEY(song_id)
songs 14896 None KEY(song_id)
time 6813 start_time ALL
users 96 user_id ALL

Usage

To use this, you need to set output_data path in etl.py to your own S3 or hdfs

  1. Copy
$ git clone https://github.com/kjh7176/data_lakes_with_spark

# change current working directory
$ cd data_lakes_with_spark
  1. Execute ETL process
$ python etl.py
  1. Test
    Open sample_parquet_data.ipynb in order to check if data is inserted correctly.

data_lakes_with_spark's People

Contributors

kjh7176 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.