Code Monkey home page Code Monkey logo

rest_api_spark_etl's Introduction

ETL Pipeline with Apache Spark using a REST API

Project Overview

Extract, transform, and load (ETL) pipelines process data from multiple sources into central repositories to serve various business purposes.This project uses a toy pipeline to model an ETL in the wild that ingests data from a REST API using PySpark.

This project creates an ETL (extract, transform, load) pipeline that:

  • Imports data from a public API (using PySpark, the Python API for Spark)
  • Creates a dataframe
  • Creates a temporary view or HIVE table for SQL queries
  • Cleans and transform the data based on business requirements
  • Converts and stores data in requested file formats such as (CSV,ORC, JSON, Parquet)
  • Creates visualization using Matplotlib on process data.

For a detailed explanation on the ETL processes used, check out the accompanying article on medium

Code

You can find the code for this project here.

File overview:

  • ETL_Pipeline_with_Apache_Spark_using_a_Rest_API.ipynb - the full code from this project

Environment Setup

Installation

To follow this project, please install the following locally:

  • Python 3.8+
  • Spark-3.2.1
  • os
  • sys
  • Python packages
    • pyspark
    • pyspark.sql.functions
    • Matplotlib

Data

You can access the USA Spending API used for the project here:

To understand the terminiologies used to describe columns in the data, you can preview this document:

rest_api_spark_etl's People

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.