How to run one airflow task and all its dependencies?

itzjustricky picture itzjustricky · Mar 6, 2017 · Viewed 7.4k times · Source

I suspected that

airflow run dag_id task_id execution_date

would run all upstream tasks, but it does not. It will simply fail when it sees that not all dependent tasks are run. How can I run a specific task and all its dependencies? I am guessing this is not possible because of an airflow design decision, but is there a way to get around this?

Answer

Priyank Mehta picture Priyank Mehta · Mar 7, 2017

You can run a task independently by using -i/-I/-A flags along with the run command.

But yes the design of airflow does not permit running a specific task and all its dependencies.

You can backfill the dag by removing non-related tasks from the DAG for testing purpose