Giter Club home page Giter Club logo

beacontest's Introduction

beacontest

Extracting Github Data into Redshift

Data Pipeline with Airfow

This project's purpose is to extract contributor and open issue data from a given repositoy, into cloud storage. From cloud storage, the data is then loaded into a Redshift database. The tables generated are; airflow_contributors and airflow_open_issues.

Endpoints used

Contributors data

PyGithub:

Github REST API:

Issues data

PyGithub:

Github REST API:

Redshift Tables and Data Model Generated

Tables

  • airflow_contributors
  • airflow_open_issues

Rough Data Model

airflow_contributors columns:

  • colname, data type
  • company, text
  • contributions, int
  • email, text
  • id, bigint
  • login, text
  • name, text

airflow_open_issues columns:

  • colname, data type
  • title, text
  • number, int

Dependencies

You will need to install Airflow and run the scheduler

  • pip install -r requirements.txt
  • airflow scheduler
  • I am using python version 3.6.9
  • aws credentials stored in ~/.aws/credentials

Sensitive Variables and Connections

Airflow Variables and Connections can store encrypted credentials. There is a create_conns_and_vars.sh executable bash script not in this repository, but in the parent directory ~/airflow/ from the ec2 instance from which this code is being pushed from. This bash script will load sensitive Variables and connections.

Local Postgres database for webserver to run on

I set up a local postgres database for which the airflow webserver to run on. An issue I ran into was that my bash session was not being loaded with the most up to date configurations in ~/airflow/airflow.cfg. I had to manually add the logging database in a ~/.bashrc file in order for logging to go to a local database with user airflow and password included in ~/.bashrc file.

S3 Logging

S3 Logging is configured in airflow.cfg seemingly correctly, but I ran into a similar issue as the postgres database not being loaded by airflow.cfg. I did not find a manual override for this logging to execute on the given s3 connection so this aspect of the test did not execute correctly.

Tutorials and Links followed

Local Postgres installation for airflow: https://medium.com/@taufiq_ibrahim/apache-airflow-installation-on-ubuntu-ddc087482c14

Coding Style test

I follow PEP8 standards which can be automatically implemented using the black command: black filename.py

Permissions

You will need to be a part of users on the ec2 instance to run these DAGs.

beacontest's People

Contributors

angelddaz avatar

Stargazers

Elan Simon Parsons avatar

Watchers

James Cloos avatar  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.