Get startedGet started for free

Templates with multiple arguments

You wish to build upon your previous DAG and modify the code to support two arguments - the date in YYYYMMDD format, and a file name passed to the cleandata.sh script.

This exercise is part of the course

Introduction to Apache Airflow in Python

View Course

Exercise instructions

  • Modify the templated command to handle a second argument called filename.
  • Change the first BashOperator to pass the filename salesdata.txt to the command.
  • Add a new BashOperator called clean_task2 to use a second filename supportdata.txt.
  • Set clean_task2 downstream of clean_task.

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise