Git Product home page Git Product logo

etl-airflow's Introduction

ETL Airflow

ETL Learning Project Using Airflow

Prerequisite

  • Docker
  • Docker Compose

How to run

  • On Linux, the mounted volumes in container use the native Linux filesystem user/group permissions, so you have to make sure the container and host computer have matching file permissions.

    mkdir ./dags ./data ./logs ./output/sqlite ./plugins
    
    echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env
    
  • Run database migrations and create the first user account.

    docker-compose up airflow-init
    

    The account created has the login airflow and the password airflow.

  • Before running docker compose, you need to build image because there's some python packages we need.

    docker build .
    
  • Now run all services

    docker-compose up
    
  • After it's all set, access the webserver

    http://localhost:8080/
    

What does my code do?

  • It's a DAG (Directed Acyclic Graph), DAG is a collection of all the tasks you want to run, organized in a way that reflects their relationships and dependencies.

  • Every DAG represents ETL (Extract, Transform, Load) process.

    • Extract is the process of reading data from a datasource. In this stage, the data is collected, often from multiple and different types of sources.
    • Transform is the process of converting the extracted data from its previous form into the form it needs to be in so that it can be placed into another database. Transformation occurs by using rules or lookup tables, by combining the data with other data or by cleaning the tables.
    • Load is the process of writing the data into the target database.
  • It's an example of my DAG that using dynamic TaskGroup in extract process: Chinook

etl-airflow's People

Contributors

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