Creating a production pipeline #2
Continuing on your last workflow, you'd like to add some additional functionality, specifically adding some SLAs to the code and modifying the sensor components.
Refer to the source code of the DAG to determine if anything extra needs to be added. The default_args dictionary has been defined for you, though it may require further modification.
This exercise is part of the course
Introduction to Apache Airflow in Python
Exercise instructions
- Add a
sla
of 90 minutes to the DAG usingtimedelta()
function. - Update the
FileSensor
object to check for files every 45 seconds usingpoke_interval
parameter. - Modify the
python_task
to send Airflow variables to the callable. Note that the callable is configured to accept the variables using theprovide_context
argument.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
