Skip to main content

Programmatically author, schedule and monitor data pipelines

Project description

Apache Airflow

PyPI version Airflow Build Status Coverage Status Documentation Status License PyPI - Python Version Twitter Follow Slack Status

NOTE: The transition from 1.8.0 (or before) to 1.8.1 (or after) requires uninstalling Apache Airflow before installing the new version. The package name was changed from airflow to apache-airflow as of version 1.8.1.

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

Requirements

Apache Airflow is tested with:

Master version (2.0.0dev)

  • Python versions: 3.6, 3.7, 3.8
  • Postgres DB: 9.6, 10
  • MySQL DB: 5.7
  • Sqlite - latest stable (it is used mainly for development purpose)
  • Kubernetes - 1.16.2, 1.17.0

Stable version (1.10.11)

  • Python versions: 2.7, 3.5, 3.6, 3.7, 3.8
  • Postgres DB: 9.6, 10
  • MySQL DB: 5.6, 5.7
  • Sqlite - latest stable (it is used mainly for development purpose)
  • Kubernetes - 1.16.2, 1.17.0

Additional notes on Python version requirements

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

Getting started

Please visit the Airflow Platform documentation (latest stable release) for help with installing Airflow, getting a quick start, or a more complete tutorial.

Documentation of GitHub master (latest development branch): ReadTheDocs Documentation

For further information, please visit the Airflow Wiki.

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

Installing from PyPI

Airflow is published 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 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:
pip install apache-airflow==1.10.12 \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt"
  1. Installing with extras (for example postgres,gcp)
pip install apache-airflow[postgres,gcp]==1.10.11 \
 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt"

Building customized production images

In order to use Airflow in Docker Compose or Kubernetes, you might need to use or build production images of Apache Airflow. The community provides two types of support for the production images:

  • We provide pre-build relesed version of production image in PyPI build from released sources of Apache Airflow - shortly after release. Those images are available in the DockerHub. You can pull those images via docker pull apache/airflow:<VERSION>-pythonX.Y - version is the version number (for example 1.10.11). Additionally docker pull apache/airflow will pull latest stable version of the image with default python version (currently 3.6)

  • In master branch of Airflow and in v1-10-stable branch we provide Dockerfiles and accompanying files that allow to build your own customized version of the Airflow Production image. The instructions on how to build your own image with additional dependencies (if needed) are provided in the IMAGES.rst if you want to build it using docker build command or in BREEZE.rst to use Breeze tool which easier interface, auto-complete, and accompanying screencast video. Note, that while it is possible to use master branch to build images for released Airflow versions, it might at times get broken so you should rather rely on building your own images from the v1-10-stable branch.

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.

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.

User Interface

  • DAGs: Overview of all DAGs in your environment.

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

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

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

  • Gantt View: Duration and overlap of a DAG.

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

Using hooks and Operators from "master" in Airflow 1.10

Currently stable versions of Apache Airflow are released in 1.10.* series. We are working on the future, major version of Airflow from the 2.0.* series. It is going to be released in in 2020. However the exact time of release depends on many factors and is yet unknown. We have already a lot of changes in the hooks/operators/sensors for many external systems and they are not used because they are part of the master/2.0 release.

In the Airflow 2.0 - following AIP-21 "change in import paths" all the non-core operators/hooks/sensors of Apache Airflow have been moved to the "airflow.providers" package. This opened a possibility to use the operators from Airflow 2.0 in Airflow 1.10 - with the constraint that those packages can only be used in python3.6+ environment.

Therefore we decided to prepare and release backport packages that can be installed for older Airflow versions. Those backport packages are released more frequently. Users do not have to upgrade their Airflow version to use those packages. There are a number of changes between Airflow 2.0 and 1.10.* - documented in UPDATING.md. With backported providers package users can migrate their DAGs to the new providers package incrementally and once they convert to the new operators/sensors/hooks they can seamlessly migrate their environments to Airflow 2.0.

More information about the status and releases of the back-ported packages are available at Backported providers package page

Dependencies between packages are stored in airflow/providers/dependencies.json. See CONTRIBUTING.rst

Contributing

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

Who uses Airflow?

As the Apache Airflow community grows, we'd like to keep track of who is using the platform. Please send a PR with your company name and @githubhandle if you may.

Committers:

Currently officially using Airflow:

  1. AdBOOST [AdBOOST]
  2. Agari [@r39132]
  3. Airbnb [@mistercrunch, @artwr]
  4. Airtel [@harishbisht]
  5. Alan [@charles-go]
  6. allegro.pl [@kretes]
  7. AltX [@pedromduarte]
  8. Apigee [@btallman]
  9. ARGO Labs [California Data Collaborative]
  10. Astronomer [@schnie, @andscoop, @tedmiston, @benjamingregory]
  11. Auth0 [@sicarul]
  12. Away [@trunsky]
  13. Azri Solutions [@userimack]
  14. BalanceHero [@swalloow]
  15. Banco de Formaturas [@guiligan]
  16. BandwidthX [@dineshdsharma]
  17. Bellhops
  18. BelugaDB [@fabio-nukui & @joao-sallaberry & @lucianoviola & @tmatuki]
  19. BlaBlaCar [@puckel & @wmorin]
  20. Bloc [@dpaola2]
  21. Blue Yonder [@blue-yonder]
  22. BlueApron [@jasonjho & @matthewdavidhauser]
  23. Bluecore [@JLDLaughlin]
  24. Boda Telecom Suite - CE [@erssebaggala, @bodastage]
  25. Bodastage Solutions [@erssebaggala, @bodastage]
  26. Bonnier Broadcasting [@wileeam]
  27. BounceX [@JoshFerge, @hudsonrio, @ronniekritou]
  28. California Data Collaborative powered by ARGO Labs
  29. Carbonite [@ajbosco]
  30. Celect [@superdosh & @chadcelect]
  31. Change.org [@change, @vijaykramesh]
  32. Checkr [@tongboh]
  33. Children's Hospital of Philadelphia Division of Genomic Diagnostics [@genomics-geek]
  34. Cinimex DataLab [@kdubovikov]
  35. City of San Diego [@MrMaksimize, @andrell81 & @arnaudvedy]
  36. Clairvoyant @shekharv
  37. Clover Health [@gwax & @vansivallab]
  38. Chartboost [@cgelman & @dclubb]
  39. ContaAzul [@bern4rdelli, @renanleme & @sabino]
  40. Cotap [@maraca & @richardchew]
  41. Craig@Work
  42. Credit Karma [@preete-dixit-ck & @harish-gaggar-ck & @greg-finley-ck]
  43. CreditCards.com[@vmAggies & @jay-wallaby]
  44. Creditas [@dcassiano]
  45. Custom Ink [@david-dalisay, @dmartin11 & @mpeteuil]
  46. Data Reply [@kaxil]
  47. DataFox [@sudowork]
  48. Digital First Media [@duffn & @mschmo & @seanmuth]
  49. DocuTAP [@jshvrsn & @lhvphan & @cloneluke]
  50. Dotmodus [@dannylee12]
  51. Drivy [@AntoineAugusti]
  52. Easy Taxi [@caique-lima & @WesleyBatista & @diraol]
  53. eRevalue [@hamedhsn]
  54. evo.company [@orhideous]
  55. FreshBooks [@DinoCow]
  56. Fundera [@andyxhadji]
  57. GameWisp [@tjbiii & @theryanwalls]
  58. Gentner Lab [@neuromusic]
  59. Glassdoor [@syvineckruyk]
  60. Global Fashion Group [@GFG]
  61. GovTech GDS [@chrissng & @datagovsg]
  62. Grand Rounds [@richddr, @timz1290, @wenever, & @runongirlrunon]
  63. Groupalia [@jesusfcr]
  64. Groupon [@stevencasey]
  65. Gusto [@frankhsu]
  66. Handshake [@mhickman]
  67. Handy [@marcintustin / @mtustin-handy]
  68. HBC Digital [@tmccartan & @dmateusp]
  69. HBO[@yiwang]
  70. Healthjump [@miscbits]
  71. HelloFresh [@tammymendt & @davidsbatista & @iuriinedostup]
  72. Holimetrix [@thibault-ketterer]
  73. Hootsuite
  74. Hostnfly [@CyrilLeMat & @pierrechopin & @alexisrosuel]
  75. HotelQuickly [@zinuzoid]
  76. IFTTT [@apurvajoshi]
  77. iHeartRadio[@yiwang]
  78. imgix [@dclubb]
  79. ING
  80. Intercom [@fox & @paulvic]
  81. Investorise [@svenvarkel]
  82. Jampp
  83. JobTeaser [@stefani75 & @knil-sama]
  84. Kalibrr [@charlesverdad]
  85. Karmic [@hyw]
  86. Kiwi.com [@underyx]
  87. Kogan.com [@geeknam]
  88. Lemann Foundation [@fernandosjp]
  89. LendUp [@lendup]
  90. LetsBonus [@jesusfcr & @OpringaoDoTurno]
  91. liligo [@tromika]
  92. LingoChamp [@haitaoyao]
  93. Lucid [@jbrownlucid & @kkourtchikov]
  94. Lumos Labs [@rfroetscher & @zzztimbo]
  95. Lyft[@SaurabhBajaj]
  96. M4U [@msantino]
  97. Madrone [@mbreining & @scotthb]
  98. Markovian [@al-xv, @skogsbaeck, @waltherg]
  99. Mercadoni [@demorenoc]
  100. Mercari [@yu-iskw]
  101. MFG Labs
  102. MiNODES [@dice89, @diazcelsa]
  103. Multiply [@nrhvyc]
  104. mytaxi [@mytaxi]
  105. Nerdwallet
  106. New Relic [@marcweil]
  107. Newzoo [@newzoo-nexus]
  108. Nextdoor [@SivaPandeti, @zshapiro & @jthomas123]
  109. OdysseyPrime [@davideberdin]
  110. OfferUp
  111. OneFineStay [@slangwald]
  112. Open Knowledge International @vitorbaptista
  113. Overstock [@mhousley & @mct0006]
  114. Pandora Media [@Acehaidrey & @wolfier]
  115. PAYMILL [@paymill & @matthiashuschle]
  116. PayPal [@r39132 & @jhsenjaliya]
  117. Pernod-Ricard [@romain-nio]
  118. Plaid [@plaid, @AustinBGibbons & @jeeyoungk]
  119. Playbuzz [@clintonboys & @dbn]
  120. PMC [@andrewm4894]
  121. Postmates [@syeoryn]
  122. Pronto Tools [@zkan & @mesodiar]
  123. PubNub [@jzucker2]
  124. Qplum [@manti]
  125. Quantopian [@eronarn]
  126. Qubole [@msumit]
  127. Quizlet [@quizlet]
  128. Quora
  129. REA Group
  130. Reddit [@reddit]
  131. Robinhood [@vineet-rh]
  132. Scaleway [@kdeldycke]
  133. Sense360 [@kamilmroczek]
  134. Shopkick [@shopkick]
  135. Sidecar [@getsidecar]
  136. SimilarWeb [@similarweb]
  137. SmartNews [@takus]
  138. SocialCops [@vinayak-mehta & @sharky93]
  139. Spotahome [@spotahome]
  140. Spotify [@znichols]
  141. Stackspace
  142. Stripe [@jbalogh]
  143. Tails.com [@alanmcruickshank]
  144. Thinking Machines [@marksteve]
  145. Thinknear [@d3cay1, @ccson, & @ababian]
  146. Thumbtack [@natekupp]
  147. Tictail
  148. Tile [@ranjanmanish]
  149. Tokopedia @topedmaria
  150. Twine Labs [@ivorpeles]
  151. Twitter [@aoen]
  152. T2 Systems [@unclaimedpants]
  153. Ubisoft [@Walkoss]
  154. United Airlines [@ilopezfr]
  155. Upsight [@dhuang]
  156. Vente-Exclusive.com [@alexvanboxel]
  157. Vevo [@csetiawan & @jerrygillespie]
  158. Vnomics [@lpalum]
  159. WePay [@criccomini & @mtagle]
  160. WeTransfer [@jochem]
  161. Whistle Labs [@ananya77041]
  162. WiseBanyan
  163. Wooga
  164. Xero [@yan9yu]
  165. Xoom
  166. Yahoo!
  167. Yieldr [@ggeorgiadis]
  168. Zapier [@drknexus & @statwonk]
  169. Zego [@ruimffl]
  170. Zendesk
  171. Zenly [@cerisier & @jbdalido]
  172. Zymergen
  173. 99 [@fbenevides, @gustavoamigo & @mmmaia]

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.

Links

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache-airflow-1.10.12rc3.tar.gz (4.1 MB view hashes)

Uploaded Source

Built Distribution

apache_airflow-1.10.12rc3-py2.py3-none-any.whl (4.7 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page