Apache Airflow (incubating) Documentation — Airflow Documentation

# Apache Airflow (incubating) Documentation

Important

Disclaimer: Apache Airflow is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Airflow is a platform to programmatically author, schedule and monitor workflows.

Use airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command line utilities make performing complex surgeries on DAGs a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress, and troubleshoot issues when needed.

When workflows are defined as code, they become more maintainable, versionable, testable, and collaborative.

## Principles

- Dynamic: Airflow pipelines are configuration as code (Python), allowing for dynamic pipeline generation. This allows for writing code that instantiates pipelines dynamically.
- Extensible: Easily define your own operators, executors and extend the library so that it fits the level of abstraction that suits your environment.
- Elegant: Airflow pipelines are lean and explicit. Parameterizing your scripts is built into the core of Airflow using the powerful Jinja templating engine.
- Scalable: Airflow has a modular architecture and uses a message queue to orchestrate an arbitrary number of workers. Airflow is ready to scale to infinity.

## Beyond the Horizon

Airflow is not a data streaming solution. Tasks do not move data from one to the other (though tasks can exchange metadata!). Airflow is not in the Spark Streaming or Storm space, it is more comparable to Oozie or Azkaban.

Workflows are expected to be mostly static or slowly changing. You can think of the structure of the tasks in your workflow as slightly more dynamic than a database structure would be. Airflow workflows are expected to look similar from a run to the next, this allows for clarity around unit of work and continuity.

## Content

- Project
  - History
  - Committers
  - Resources & links
  - Roadmap
- License
- Quick Start
  - What’s Next?
- Installation
  - Getting Airflow
  - Extra Packages
- Tutorial
  - Example Pipeline definition
  - It’s a DAG definition file
  - Importing Modules
  - Default Arguments
  - Instantiate a DAG
  - Tasks
  - Templating with Jinja
  - Setting up Dependencies
  - Recap
  - Testing
    - Running the Script
    - Command Line Metadata Validation
    - Testing
    - Backfill
  - What’s Next?
- Configuration
  - Setting Configuration Options
  - Setting up a Backend
  - Connections
  - Scaling Out with Celery
  - Logs
  - Scaling Out on Mesos (community contributed)
  - Integration with systemd
  - Integration with upstart
  - Test Mode
- UI / Screenshots
  - DAGs View
  - Tree View
  - Graph View
  - Variable View
  - Gantt Chart
  - Task Duration
  - Code View
  - Task Instance Context Menu
- Concepts
  - Core Ideas
    - DAGs
      - Scope
      - Default Arguments
      - Context Manager
    - Operators
      - DAG Assignment
      - Bitshift Composition
    - Tasks
    - Task Instances
    - Workflows
  - Additional Functionality
    - Hooks
    - Pools
    - Connections
    - Queues
    - XComs
    - Variables
    - Branching
    - SubDAGs
    - SLAs
    - Trigger Rules
    - Latest Run Only
    - Zombies & Undeads
    - Cluster Policy
    - Documentation & Notes
    - Jinja Templating
  - Packaged dags
- Data Profiling
  - Adhoc Queries
  - Charts
    - Chart Screenshot
    - Chart Form Screenshot
- Command Line Interface
- Scheduling & Triggers
  - DAG Runs
  - Backfill and Catchup
  - External Triggers
  - To Keep in Mind
- Plugins
  - What for?
  - Why build on top of Airflow?
  - Interface
  - Example
- Security
  - Web Authentication
    - Password
    - LDAP
    - Roll your own
  - Multi-tenancy
  - Kerberos
    - Limitations
    - Enabling kerberos
    - Using kerberos authentication
  - OAuth Authentication
    - GitHub Enterprise (GHE) Authentication
      - Setting up GHE Authentication
    - Google Authentication
      - Setting up Google Authentication
  - SSL
    - Impersonation
- Experimental Rest API
  - Endpoints
  - CLI
  - Authentication
- Integration
  - AWS: Amazon Webservices
  - GCP: Google Cloud Platform
    - BigQuery
      - BigQuery Operators
      - BigQueryHook
    - Cloud DataFlow
      - DataFlow Operators
      - DataFlowHook
    - Cloud DataProc
      - DataProc Operators
      - DataProcPySparkOperator
    - Cloud Datastore
      - Datastore Operators
    - Cloud Storage
      - Storage Operators
      - GoogleCloudStorageHook
- FAQ
  - Why isn’t my task getting scheduled?
  - How do I trigger tasks based on another task’s failure?
  - Why are connection passwords still not encrypted in the metadata db after I installed airflow[crypto]?
  - What’s the deal with `start_date`?
  - How can I create DAGs dynamically?
  - What are all the `airflow run` commands in my process list?
- API Reference
  - Operators
    - BaseOperator
    - BaseSensorOperator
    - Operator API
    - Community-contributed Operators
  - Macros
    - Default Variables
    - Macros
  - Models
  - Hooks
    - Community contributed hooks
  - Executors
    - Community-contributed executors