Coder Social home page Coder Social logo

qusay-elewy / data-pipelines-with-airflow Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 20 KB

Udacity Data Engineering Nanodegree - Project #5

Python 100.00%
python data-engineering airflow-dags airflow-plugin etl sql airflow udacity-data-engineer-nanodegree amazon-s3 star-schema

data-pipelines-with-airflow's Introduction

Data Pipelines with Airflow

This project creates an ETL for a music streaming compan,Sparkify, using Apache Airflow. It extracts data from JSON files that are stored on Amazon S3 and stages it on Amazon Redshift.

Star schema is used to build our data model where songplays represents that fact table, whcih is linked to a number of dimenssion tables, namely users, time, artists, and songs.

Structure

DAG & Operators

This ETL has only on DAG which is composed of a number of tasks that use custom-made operators, described as follows:

  • StageToRedshiftOperator: This operator is defined in stage_redshift.py and it is used to read data files from an S3 buckets and save it into relational database on Redshift.
  • LoadFactOperator: This operator is defined in load_fact.py and it is used to extract fact table data from the stagging tables and load it into out fact table.
  • LoadDimensionOperator: This operator is defined in load_dimenssion.py and it is used to extract the dimession tables data from the stagging tables and load it into the defined dimmenssion tables.
  • DataQualityOperator: This operator is defined in data_quality.py and it is used to perform some quality checks on our Redshift data tables.

SQL Queries

Most of the SQL queries are seperated from the Python files for clarity and reusability. The DDL queries are defined in create_tables.py, whereas the ETL queries are defined in sql_queries.py.

Prerequisites

  • User needs to create two connection variables in Apache Airflow before running this ETL. One connection variable is needed to connect to Amazon Web Services, and the other needs to connect to Redshift.

data-pipelines-with-airflow's People

Contributors

qusay-elewy avatar

Watchers

 avatar

Forkers

hawary13

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.