From the course: Learning Apache Airflow

Unlock this course with a free trial

Join today to access over 24,200 courses taught by industry experts.

Specifying task dependencies

Specifying task dependencies - Apache Airflow Tutorial

From the course: Learning Apache Airflow

Specifying task dependencies

- [Instructor] While it was exciting to run our first dag, a dag with a single task is kind of boring. Now, let's see how we can specify dependencies between tasks and have one task run after the other. Now, I'm within a new file called execute multiple tasks dot py. That's within my dags subfolder. I've gotten rid of all the other files that were here. I'm going to paste in the contents of my new dag, which has two tasks and one task depends on another. Notice I've used the width keyword to instantiate my dag. This dag has a separate unique ID executing multiple tasks. Notice the schedule interval says @once. This is useful if you want to trigger the dag manually or you want to schedule the dag using an external trigger. So, we haven't come to external triggers. We don't need to worry about that, but you should know that @once is a great schedule interval, especially if you're running it manually. Now, I have two operators or…

Contents