You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm loving airflow, just wanted to clarify the right way to run an adhoc pipeline. We will eventually move to daily batches, but at the moment our pipeline just needs to be run ad hoc. Backfill seems to run all jobs form the start date. So whats the best way to just kick off a chain when needed? Apologies if I've missed something in the documentation!
Depending on what your needs are, there are several ways to help with this:
The first one is to define a DAG with {'adhoc': True} in the default_args. This will ensure that the pipeline is not scheduled, and the tasks only run when a manual run/backfill command is issued.
If you can formulate your pipeline as depending on a particular trigger (presence of a File, or a partition in Hive, or a key in S3), then it could run daily and only run to process that particular file should you chose to.
"Backfill seems to run all jobs form the start date"
Well only if you don't pass it a start_date, see airflow backfill -h for all the options, but look at -s, -e and -a
The idea with adhoc=True tasks (note that it is a task level parameter) is that you can squeeze them in a DAG alongside scheduled tasks and have them around, ready for their occasional use cases. You'd then trigger them with an airflow backfill -a [...] command when needed.
Other options you may consider are to pause individual DAGs in the UI, or simply not run the scheduler at all.
Activity
artwr commentedon Aug 28, 2015
Depending on what your needs are, there are several ways to help with this:
{'adhoc': True}in the default_args. This will ensure that the pipeline is not scheduled, and the tasks only run when a manual run/backfill command is issued.Of course you can combine the approaches.
Let me know if you need more help.
mistercrunch commentedon Aug 28, 2015
"Backfill seems to run all jobs form the start date"
Well only if you don't pass it a start_date, see
airflow backfill -hfor all the options, but look at-s,-eand-aThe idea with
adhoc=Truetasks (note that it is a task level parameter) is that you can squeeze them in a DAG alongside scheduled tasks and have them around, ready for their occasional use cases. You'd then trigger them with anairflow backfill -a [...]command when needed.Other options you may consider are to pause individual DAGs in the UI, or simply not run the scheduler at all.
eoin-o commentedon Sep 1, 2015
Thank you both!
Merge pull request apache#330 from NikolaPeevski/bug/329