Execute entire DAG using Airflow UI
<p>I am newbie to airflow, We have a DAG with 3 tasks. Currently we are using Celery Executor as we need the flexibility to run an individual task. We don't want to schedule the workflow, for now it will be manual trigger. Is there any way to execute the entire workflow using the Airflow UI (Same as we have in oozie)?</p>

<p>Executing one task at a time is a pain.</p>

<p>I'll take a stab at it and hopefully you can adapt your code to work with this.</p>

<pre><code>default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2015, 6, 1),
'email': ['airflow@airflow.com'],
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
# 'queue': 'bash_queue',
# 'pool': 'backfill',
# 'priority_weight': 10,
# 'end_date': datetime(2016, 1, 1),
}

dag = DAG('your_dag', default_args=default_args)

#start of your tasks

first_task = BashOperator(task_id='print_date',
                          bash_command='python script1_name args',
                          dag=dag)
second_task = BashOperator(task_id='print_date',
                          bash_command='python script2_name args',
                          dag=dag)
third_task = BashOperator(task_id='print_date',
                          bash_command='python script_name args',
                          dag=dag)

#then set the dependencies
second_task.set_upstream(first_task)
third_task.set_upstream(second_task)
</code></pre>

<p>Then when you trigger the DAG, all three tasks will run in order. If these tasks are <em>not</em> dependent on each other, you can remove the <code>set_upstream()</code> lines from the script. Note that all of these tasks must be in the same script to run with one command.</p>

python airflow