Apache Airflow (Incubating)
Перейти к файлу
Jarek Potiuk 4ce952e7c2
Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756)
The whole Backfill class was in Heisentest but only one of those tests
is problematic nowi: test_backfill_depends_on_past. Therfore it makes
sense to remove the class from heisentests and move the
depends_on_past to quarantine.

It turned out that this is the last "Heisentest" and with the
isolation we have now coming in parallel tests, it turns out that
Heisentests are not really good way thinking about the tests - running
them in isolation does not often help, it only makes it more difficult
to flag the tests as flaky.

The quarantine test_backfill_depends_on_past ihas been captured in
the #14755 issue - and hopefully we will make an effort to
de-quarantine some of those tests soon.
2021-03-13 17:57:45 +01:00
.github Fixed runs-on for non-apache repository (#14737) 2021-03-12 02:31:26 +01:00
airflow Fix attributes for AzureDataFactory hook (#14704) 2021-03-12 21:54:54 +00:00
chart Wrapping create-user-job by double quote for Helm Chart (#14723) 2021-03-12 00:58:48 +00:00
clients Run openapi-generator as "current" user, not root. (#13674) 2021-01-14 15:16:12 +00:00
dags Move dummy_operator.py to dummy.py (#11178) (#11293) 2020-12-08 19:19:46 +00:00
dev Small fixes in provider preparation docs (#14689) 2021-03-12 22:28:08 +00:00
docker-context-files Production images on CI are now built from packages (#12685) 2020-12-06 23:36:33 +01:00
docs Note that the DB must be using UTF-8 (#14742) 2021-03-12 11:37:00 +00:00
empty Prepare release candidate for backport packages (#8891) 2020-05-17 20:38:46 +02:00
hooks Group CI scripts in subdirectories (#9653) 2020-07-16 18:05:35 +02:00
images Developers Quick Guide (#13417) 2021-01-01 06:08:59 +01:00
kubernetes_tests Revert "Fix error with quick-failing tasks in KubernetesPodOperator (#13621)" (#13835) 2021-01-22 12:24:20 +01:00
license-templates [AIRFLOW-5234] Rst files have consistent, auto-added license 2019-08-18 19:51:02 -04:00
licenses Replace JS package toggle w/ pure CSS solution (#11035) 2020-09-21 12:29:05 +01:00
manifests Simplifies check whether the CI image should be rebuilt (#12181) 2020-11-13 22:21:39 +01:00
metastore_browser Switch to f-strings using flynt. (#13732) 2021-01-23 06:19:38 +01:00
provider_packages Fixes to release process after releasing 2nd wave of providers (#14059) 2021-02-04 10:11:00 +01:00
scripts Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
tests Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
.asf.yaml Enable v1-10-stable branch protection (#12525) 2020-11-20 16:52:56 -08:00
.bash_completion [AIRFLOW-3611] Simplified development environment (#4932) 2019-08-27 14:39:36 -04:00
.coveragerc Bring back code coverage (#10143) 2020-08-05 09:44:24 +02:00
.dockerignore Attempts to stabilize and improve speed of static checks (#14332) 2021-02-21 10:22:17 +01:00
.editorconfig [AIRFLOW-6714] Remove magic comments about UTF-8 (#7338) 2020-02-02 22:18:19 +01:00
.flake8 Enable Black on Providers Packages (#10543) 2020-08-25 17:39:04 +01:00
.gitignore Add quick start for Airflow on Docker (#13660) 2021-01-26 13:45:49 +01:00
.gitmodules Run "third party" github actions from submodules instead (#13514) 2021-01-11 11:38:15 +01:00
.hadolint.yaml [AIRFLOW-5180] Added static checks (yamllint) + auto-licences for yaml file (#5790) 2019-08-22 10:13:56 -04:00
.mailmap Add an alias to improve git shortlog output (#12286) 2020-11-11 13:06:33 -05:00
.markdownlint.yml Enable Markdownlint rule MD003/heading-style/header-style (#12427) 2020-11-18 07:31:15 +01:00
.pre-commit-config.yaml Refactor Taskflow decorator for extensibility (#14709) 2021-03-12 13:43:32 -08:00
.rat-excludes Add missing licences. (#12922) 2020-12-08 17:32:29 +01:00
.readthedocs.yml Fix build on RTD (#12551) 2020-11-23 09:52:24 +01:00
BREEZE.rst Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
CHANGELOG.txt docs: Capitalise & minor fixes (#14283) (#14534) 2021-03-04 16:24:34 +00:00
CI.rst docs: Capitalise & minor fixes (#14283) (#14534) 2021-03-04 16:24:34 +00:00
CODE_OF_CONDUCT.md Add Apache Airflow CODE_OF_CONDUCT.md (#9715) 2020-08-05 16:02:04 +02:00
COMMITTERS.rst chore: fix case of GitHub (#14525) 2021-02-28 10:25:15 +01:00
CONTRIBUTING.rst Adds new Airbyte provider (#14492) 2021-03-06 15:19:30 +01:00
CONTRIBUTORS_QUICK_START.rst Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
Dockerfile Prepare ad-hoc release of the four previously excluded providers (#14655) 2021-03-08 20:27:03 +01:00
Dockerfile.ci Remove duplicated WORKDIR in CI Dockerfile (#14697) 2021-03-11 09:44:42 +00:00
IMAGES.rst Fix grammar and remove duplicate words (#14647) 2021-03-07 11:28:54 +01:00
INSTALL Adds new Airbyte provider (#14492) 2021-03-06 15:19:30 +01:00
INTHEWILD.md adding textnow to users (#14568) 2021-03-02 21:55:21 +00:00
ISSUE_TRIAGE_PROCESS.rst chore: fix case of GitHub (#14525) 2021-02-28 10:25:15 +01:00
LICENSE Make warnings more visible (#12204) 2020-11-09 21:14:46 +00:00
LOCAL_VIRTUALENV.rst Fix broken link in LOCAL_VIRTUALENV.rst (#14634) 2021-03-05 23:50:40 +00:00
MANIFEST.in Introduces separate runtime provider schema (#13488) 2021-01-11 23:10:44 +01:00
NOTICE docs: NOTICE: Updated 2016-2019 to 2016-now (#14248) 2021-02-15 21:45:32 +01:00
PULL_REQUEST_WORKFLOW.rst Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
README.md Fix various links in README.md (#14630) 2021-03-05 22:49:43 +00:00
STATIC_CODE_CHECKS.rst docs: Capitalise & minor fixes (#14283) (#14534) 2021-03-04 16:24:34 +00:00
TESTING.rst Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
UPDATING.md docs: Capitalise & minor fixes (#14283) (#14534) 2021-03-04 16:24:34 +00:00
breeze Fix grammar and remove duplicate words (#14647) 2021-03-07 11:28:54 +01:00
breeze-complete Remove Heisentest category and quarantine test_backfill_depends_on_past (#14756) 2021-03-13 17:57:45 +01:00
codecov.yml Fix Code Coverage (#13092) 2020-12-15 21:33:39 +00:00
confirm Implement Google Shell Conventions for breeze script (#10695) 2020-09-02 21:55:50 +02:00
pylintrc Attempts to stabilize and improve speed of static checks (#14332) 2021-02-21 10:22:17 +01:00
pylintrc-tests Attempts to stabilize and improve speed of static checks (#14332) 2021-02-21 10:22:17 +01:00
pyproject.toml Add missing licences. (#12922) 2020-12-08 17:32:29 +01:00
pytest.ini Remove unknown pytest.ini setting (#10923) 2020-09-14 09:49:41 +01:00
setup.cfg Update Flask-AppBuilder dependency to allow 3.2 (and all 3.x series) (#14665) 2021-03-08 17:12:05 +00:00
setup.py Prepare ad-hoc release of the four previously excluded providers (#14655) 2021-03-08 20:27:03 +01:00
yamllint-config.yml [AIRFLOW-5180] Added static checks (yamllint) + auto-licences for yaml file (#5790) 2019-08-22 10:13:56 -04:00

README.md

Apache Airflow

PyPI version GitHub Build Coverage Status License PyPI - Python Version Docker Pulls Docker Stars PyPI - Downloads Code style: black Twitter Follow Slack Status

Apache Airflow (or simply Airflow) is a platform to programmatically author, schedule, and monitor workflows.

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

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.

Table of contents

Project Focus

Airflow works best with workflows that are mostly static and slowly changing. When DAG structure is similar from one run to the next, it allows for clarity around unit of work and continuity. Other similar projects include Luigi, Oozie and Azkaban.

Airflow is commonly used to process data, but has the opinion that tasks should ideally be idempotent (i.e. results of the task will be the same, and will not create duplicated data in a destination system), and should not pass large quantities of data from one task to the next (though tasks can pass metadata using Airflow's Xcom feature). For high-volume, data-intensive tasks, a best practice is to delegate to external services that specialize on that type of work.

Airflow is not a streaming solution, but it is often used to process real-time data, pulling data off streams in batches.

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.

Requirements

Apache Airflow is tested with:

Master version (dev) Stable version (2.0.1) Previous version (1.10.14)
Python 3.6, 3.7, 3.8 3.6, 3.7, 3.8 2.7, 3.5, 3.6, 3.7, 3.8
PostgreSQL 9.6, 10, 11, 12, 13 9.6, 10, 11, 12, 13 9.6, 10, 11, 12, 13
MySQL 5.7, 8 5.7, 8 5.6, 5.7
SQLite 3.15.0+ 3.15.0+ 3.15.0+
Kubernetes 1.16.9, 1.17.5, 1.18.6 1.16.9, 1.17.5, 1.18.6 1.16.9, 1.17.5, 1.18.6

Note: MySQL 5.x versions are unable to or have limitations with running multiple schedulers -- please see the Scheduler docs. MariaDB is not tested/recommended.

Note: SQLite is used in Airflow tests. Do not use it in production. We recommend using the latest stable version of SQLite for local development.

Support for Python versions

As of Airflow 2.0 we agreed to certain rules we follow for Python support. They are based on the official release schedule of Python, nicely summarized in the Python Developer's Guide

  1. We finish support for Python versions when they reach EOL (For Python 3.6 it means that we will remove it from being supported on 23.12.2021).

  2. The "oldest" supported version of Python is the default one. "Default" is only meaningful in terms of "smoke tests" in CI PRs which are run using this default version.

  3. We support a new version of Python after it is officially released, as soon as we manage to make it works in our CI pipeline (which might not be immediate) and release a new version of Airflow (non-Patch version) based on this CI set-up.

Additional notes on Python version requirements

  • Previous version requires at least Python 3.5.3 when using Python 3

Getting started

Visit the official Airflow website documentation (latest stable release) for help with installing Airflow, getting started, or walking through a more complete tutorial.

Note: If you're looking for documentation for master branch (latest development branch): you can find it on s.apache.org/airflow-docs.

For more information on Airflow Improvement Proposals (AIPs), visit the Airflow Wiki.

Official Docker (container) images for Apache Airflow are described in IMAGES.rst.

Installing from PyPI

We publish Apache Airflow as apache-airflow package in PyPI. Installing it however might be sometimes tricky because Airflow is a bit of both a library and application. Libraries usually keep their dependencies open and applications usually pin them, but we should do neither and both at the same time. We decided to keep our dependencies as open as possible (in setup.py) so users can install different versions of libraries if needed. This means that from time to time plain pip install apache-airflow will not work or will produce unusable Airflow installation.

In order to have repeatable installation, however, introduced in Airflow 1.10.10 and updated in Airflow 1.10.12 we also keep a set of "known-to-be-working" constraint files in the orphan constraints-master, constraints-2-0 and constraints-1-10 branches. We keep those "known-to-be-working" constraints files separately per major/minor Python version. You can use them as constraint files when installing Airflow from PyPI. Note that you have to specify correct Airflow tag/version/branch and Python versions in the URL.

  1. Installing just Airflow:

NOTE!!!

On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might depend on your choice of extras. In order to install Airflow reliably, you might need to either downgrade pip to version 20.2.4 pip install --upgrade pip==20.2.4 or, in case you use Pip 20.3, you might need to add option] --use-deprecated legacy-resolver to your pip install command. While pip 20.3.3 solved most of the teething problems of 20.3, this note will remain here until we set pip 20.3 as official version in our CI pipeline where we are testing the installation as well. Due to those constraints, only pip installation is currently officially supported.

While they are some successes with using other tools like poetry or pip-tools, they do not share the same workflow as pip - especially when it comes to constraint vs. requirements management. Installing via Poetry or pip-tools is not currently supported.

If you wish to install airflow using those tools you should use the constraint files and convert them to appropriate format and workflow that your tool requires.

pip install apache-airflow==2.0.1 \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.0.1/constraints-3.7.txt"
  1. Installing with extras (for example postgres,google)
pip install apache-airflow[postgres,google]==2.0.1 \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.0.1/constraints-3.7.txt"

For information on installing backport providers check backport-providers.rst.

Official source code

Apache Airflow is an Apache Software Foundation (ASF) project, and our official source code releases:

Following the ASF rules, the source packages released must be sufficient for a user to build and test the release provided they have access to the appropriate platform and tools.

Convenience packages

There are other ways of installing and using Airflow. Those are "convenience" methods - they are not "official releases" as stated by the ASF Release Policy, but they can be used by the users who do not want to build the software themselves.

Those are - in the order of most common ways people install Airflow:

  • PyPI releases to install Airflow using standard pip tool
  • Docker Images to install airflow via docker tool, use them in Kubernetes, Helm Charts, docker-compose, docker swarm etc. You can read more about using, customising, and extending the images in the Latest docs, and learn details on the internals in the IMAGES.rst document.
  • Tags in GitHub to retrieve the git project sources that were used to generate official source packages via git

All those artifacts are not official releases, but they are prepared using officially released sources. Some of those artifacts are "development" or "pre-release" ones, and they are clearly marked as such following the ASF Policy.

User Interface

  • DAGs: Overview of all DAGs in your environment.

    DAGs

  • Tree View: Tree representation of a DAG that spans across time.

    Tree View

  • Graph View: Visualization of a DAG's dependencies and their current status for a specific run.

    Graph View

  • Task Duration: Total time spent on different tasks over time.

    Task Duration

  • Gantt View: Duration and overlap of a DAG.

    Gantt View

  • Code View: Quick way to view source code of a DAG.

    Code View

Contributing

Want to help build Apache Airflow? Check out our contributing documentation.

Who uses Apache Airflow?

More than 400 organizations are using Apache Airflow in the wild.

Who Maintains Apache Airflow?

Airflow is the work of the community, but the core committers/maintainers are responsible for reviewing and merging PRs as well as steering conversation around new feature requests. If you would like to become a maintainer, please review the Apache Airflow committer requirements.

Can I use the Apache Airflow logo in my presentation?

Yes! Be sure to abide by the Apache Foundation trademark policies and the Apache Airflow Brandbook. The most up to date logos are found in this repo and on the Apache Software Foundation website.

Airflow merchandise

If you would love to have Apache Airflow stickers, t-shirt etc. then check out Redbubble Shop.