Code Monkey home page Code Monkey logo

data-engineering-demo's Introduction

Data Engineering Demo

Airflow Installation

Here is a recipe for having Airflow run locally to execute the DAGs in this repository.

Make sure you have python installed on your machine. In your shell enter directory which also hosts this README.

If not already in a virtual environment. Create one.

python3 -m venv .venv
source .venv/bin/activate

Then run the following shell commands to install airflow and prepare for a local Airflow project.

export AIRFLOW_HOME=$PWD/.cfg
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
export AIRFLOW_VERSION=2.2.2
export PYTHON_VERSION=`python3 -c 'import sys; print(".".join([str(sys.version_info.major), str(sys.version_info.minor)]))'`
echo apache-airflow==$AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" > requirements.txt
pip install -r requirements.txt

Once installed, run the following shell commands to set up the database in airflow providing a password for the admin user.

airflow db init
sed -i '' 's/load_examples = True/load_examples = False/g' '.cfg/airflow.cfg'
sed -i '' 's/.cfg\/dags/dags/g' '.cfg/airflow.cfg'
airflow db reset -y
airflow users create \
    --username admin \
    --firstname Peter \
    --lastname Parker \
    --role Admin \
    --email [email protected]

Then to run:

airflow standalone

Airflow web should now be running on your computer on localhost port 8080 and the DAGs should automatically schedule in the background.

data-engineering-demo's People

Contributors

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