Giter Club home page Giter Club logo

airflow-examples's Introduction

airflow-examples

Examples of using airflow

Components

Webserver

Scheduler

  • monitors and stays in sync with a folder for all DAG objects it may contain, and periodically (every minute or so) collects DAG parsing results and inspects active tasks to see whether they can be triggered.

  • What launches executors?

Models

  • DAG: the work, order in which work should take place.
  • DAG Run: instance of DAG for particular logical date and time.
  • Operator: class as template for doing work.
  • Task: defines work by implementing operator.
  • Task Instance: instance of task that has been assigned to DAG and has a state associated with specific DAG run.
  • execution_date: logical date time for a DAG Run and its task instances.

Steps to Create and Run Dag

How to get a dag recognized by Airflow?

  • define your dag python file in dags_folder config of airflow.cfg
  • run airflow list_dags to see if your dag was added
  • airflow list_tasks dag_id [--tree] # list tasks of dag, add --tree to se hierarchy

Airflow parses all DAGs in the background at a specific period. Default period set by processor_poll_interval config (default 1sec).

When searching for DAGs, Airflow only considers python files that contain the strings “airflow” and “DAG” by default. To consider all python files instead, disable the DAG_DISCOVERY_SAFE_MODE configuration flag.

My dag does not show up on Web UI?

  • check your dag filename, it does not include string "dag"?
  • Restart the scheduler. Scheduler periodically parses dag folders.

airflow-examples's People

Contributors

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