Skip to content

Barski-lab/incubator-airflow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airflow

PyPI version Build Status Coverage Status Code Health Requirements Status Documentation Join the chat at https://gitter.im/apache/incubator-airflow

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

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.

Getting started

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

For further information, please visit the Airflow Wiki.

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. Airflow is ready to scale to infinity.

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.

CWL support

Airflow supports running CWL descriptor files in two following modes:

  • Manual (user specifies CWL descriptor and input parameters files explicitly)
  • Batch processing (user set the path to CWL descriptor and input parameters files)

This functionality is implemented within two additional packages cwl_runner and cwl_dag to support manual and batch processing correspondingly. Internally both of them call functions from cwltool reference implementation to run each step of workflow separately. But the order of step running, transferring the data between steps and collecting results are implemented by means of Airflow.

Manual running

To run some specific CWL descriptor file with an input parameters file airflow-cwl-runner script should be used. It inherits all arguments from airflow backfill command with the following additional ones.

Positional arguments:

workflow - path to CWL descriptor file
job      - path to input parameters file

Optional arguments:

--outdir            OUTDIR            Output folder to save results
--tmp-folder        TMP_FOLDER        Temp folder to store intermediate data
                                      between airflow tasks/steps execution
--tmpdir-prefix     TMPDIR_PREFIX     Path prefix for temporary directories
--tmp-outdir-prefix TMP_OUTDIR_PREFIX Path prefix for intermediate output directories
--quiet                               Print only workflow execution results
--ignore-def-outdir                   Disable default output directory to be set to
                                      current directory. Use OUTPUT_FOLDER from
                                      Airflow configuration file instead

Example:

airflow-cwl-runner --quiet workflow.cwl parameters.json

Batch processing

To process a group of input parameters files with correspondent CWL descriptor files using airflow scheduler some additional configuration should be added into airflow.cfg file.

Update

[core]
dags_are_paused_at_creation = False
load_examples               = False

Add

[biowardrobe]
cwl_jobs        = absolute path to input parameter files folder. Required
cwl_workflows   = absolute path to workflow descriptor files folder. Required
output_folder   = absolute path to output results folder. Optional (default: current working directory)
tmp_folder      = absolute path to temporary calculation folder. Optional (default: random generated in OS temp folder)
max_jobs_to_run = maximum number of jobs to be processed at the same time, int. Optional (default: 1)
log_level       = log level, [CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET]. Optional (default: INFO)
strict          = enable strict validation, boolean. Optional (default: False)

To allow automatically fetch CWL descriptor file on the base of the input parameters file, the folowing naming rule should be implemented:

XXXXXXX.cwl         - workflow descriptor name
XXXXXXX-id.json     - input parameters files
where XXXXXXX, id   - any allowed by OS set of symbols to define filename

To run airflow scheduler with CWL support --subdir parameter should point to folder with cwl_dag.py file (which is by default in airflow.cwl_dag package). Airflow will automatically read input parameters files from cwl_jobs folder, search for correspondent CWL descriptor files in cwl_workflows folder, run it and put results in a subdirectory of output_folder

Who uses Airflow?

As the 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. Airbnb [@mistercrunch, @artwr]
  2. Agari [@r39132]
  3. allegro.pl [@kretes]
  4. AltX [@pedromduarte]
  5. Apigee [@btallman]
  6. Astronomer [@schnie]
  7. Auth0 [@sicarul]
  8. BandwidthX [@dineshdsharma]
  9. Bellhops
  10. BlaBlaCar [@puckel & @wmorin]
  11. Bloc [@dpaola2]
  12. BlueApron [@jasonjho & @matthewdavidhauser]
  13. Blue Yonder [@blue-yonder]
  14. Celect [@superdosh & @chadcelect]
  15. Change.org [@change, @vijaykramesh]
  16. Children's Hospital of Philadelphia Division of Genomic Diagnostics [@genomics-geek]
  17. City of San Diego [@MrMaksimize, @andrell81 & @arnaudvedy]
  18. Clairvoyant @shekharv
  19. Clover Health [@gwax & @vansivallab]
  20. Chartboost [@cgelman & @dclubb]
  21. Cotap [@maraca & @richardchew]
  22. Digital First Media [@duffn & @mschmo & @seanmuth]
  23. Easy Taxi [@caique-lima & @WesleyBatista]
  24. evo.company [@orhideous]
  25. FreshBooks [@DinoCow]
  26. Gentner Lab [@neuromusic]
  27. Glassdoor [@syvineckruyk]
  28. GovTech GDS [@chrissng & @datagovsg]
  29. Groupalia [@jesusfcr]
  30. Gusto [@frankhsu]
  31. Handshake [@mhickman]
  32. Handy [@marcintustin / @mtustin-handy]
  33. HBO[@yiwang]
  34. HelloFresh [@tammymendt & @davidsbatista & @iuriinedostup]
  35. Holimetrix [@thibault-ketterer]
  36. Hootsuite
  37. IFTTT [@apurvajoshi]
  38. iHeartRadio[@yiwang]
  39. ING
  40. Jampp
  41. Kiwi.com [@underyx]
  42. Kogan.com [@geeknam]
  43. Lemann Foundation [@fernandosjp]
  44. LendUp [@lendup]
  45. Letsbonus [@jesusfcr]
  46. liligo [@tromika]
  47. LingoChamp [@haitaoyao]
  48. Lucid [@jbrownlucid & @kkourtchikov]
  49. Lumos Labs [@rfroetscher & @zzztimbo]
  50. Lyft[@SaurabhBajaj]
  51. Madrone [@mbreining & @scotthb]
  52. Markovian [@al-xv, @skogsbaeck, @waltherg]
  53. Mercadoni [@demorenoc]
  54. MiNODES [@dice89, @diazcelsa]
  55. MFG Labs
  56. mytaxi [@mytaxi]
  57. Nerdwallet
  58. OfferUp
  59. OneFineStay [@slangwald]
  60. Open Knowledge International @vitorbaptista
  61. PayPal [@jhsenjaliya]
  62. Postmates [@syeoryn]
  63. Qubole [@msumit]
  64. Scaleway [@kdeldycke]
  65. Sense360 [@kamilmroczek]
  66. Shopkick [@shopkick]
  67. Sidecar [@getsidecar]
  68. SimilarWeb [@similarweb]
  69. SmartNews [@takus]
  70. Spotify [@znichols]
  71. Stackspace
  72. Stripe [@jbalogh]
  73. Thumbtack [@natekupp]
  74. T2 Systems [@unclaimedpants]
  75. Vente-Exclusive.com [@alexvanboxel]
  76. Vnomics [@lpalum]
  77. WePay [@criccomini & @mtagle]
  78. WeTransfer [@jochem]
  79. Whistle Labs [@ananya77041]
  80. WiseBanyan
  81. Wooga
  82. Xoom [@gepser & @omarvides]
  83. Yahoo!
  84. Zapier [@drknexus & @statwonk]
  85. Zendesk
  86. Zenly [@cerisier & @jbdalido]
  87. 99 [@fbenevides, @gustavoamigo & @mmmaia]

Links

Packages

No packages published

Languages

  • Python 56.5%
  • JavaScript 37.3%
  • HTML 4.0%
  • CSS 1.6%
  • Other 0.6%