Giter Site home page Giter Site logo

airflow-elt-poc's Introduction

This repo is a POC of Airflow and DBT for ELT pipelines on a CI environment.

The goal is a personal evaluation of Airflow and Dbt, exploring the following topics:

  • Setup airflow for a ci environment, how to develop and execute locally.
  • Implement custom operators/hooks, etc.
  • Testing Airflow dags, operators, hooks, using a TDD Approach.
  • Reusability of custom components.
  • Error handling in pipelines
  • ELT Comparison between airflow and airflow+dbt.
  • Testing DBT (besides dbt testing), for instance: testing if a view has the information that should.
  • How Dbt handles incremental views

The simple data pipeline example:

Read data from https://covid19api.com/, stage the data on a covid19 table, and transform the data into covid19_stats which has the stats per day per country.

Install local dev environment

Install virtual env

pip install virtualenv

Create env

virtualenv .venv

Activate env

source .venv/bin/activate

Install the same requirements as the docker image

pip install -r requirements-docker.txt

Install requirements for development

pip install -r requirements-dev.txt

Init docker

docker-compose up

Init Environment

Local development, testing and airflow local execution

source dev-env.sh

Test

python -m pytest

Run backfills

airflow backfill covid19_dbt -s 2020-10-02 -e 2020-10-02

airflow backfill covid19 -s 2020-10-02 -e 2020-10-02

Test Dag Tasks

airflow test covid19_dbt dbt_run 2020-10-02

airflow test covid19_dbt dbt_test 2020-10-02

airflow-elt-poc's People

Contributors

cdiniz avatar dmechas avatar

Stargazers

Khaled AL ARJA 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.