Introduction to Apache Airflow in Python
Mike Metzger
Data Engineer

airflow.sdk.BaseSensorOperatormode - How to check for the conditionmode='poke' - The default, run repeatedlymode='reschedule' - Give up task slot and try again laterpoke_interval - How often to wait between checkstimeout - How long to wait before failing taskairflow.providers.standard.sensors libraryfrom airflow.providers.standard.sensors.filesystem import FileSensor
file_sensor_task = FileSensor(task_id='file_sense',
filepath='salesdata.csv',
poke_interval=300,
timeout=3000
)
init_sales_cleanup() >> file_sensor_task >> generate_report()
airflow.providers.*.sensorsExternalTaskSensor - wait for a task in another Dag to completeHttpSensor - Request a web URL and check for contentSqlSensor - Runs a SQL query to check for content

Introduction to Apache Airflow in Python