Airflow & DAGs · Core Concepts & DAGs

What are Sensors?

Easysensorsdeferrable

Interview question

What are Sensors in Airflow? Give examples.

How to answer

The short answer

Sensors are special tasks that wait for something to happen: a file to land, another to finish, or an external job to complete.

Examples

Production tip

Older-style sensors can sit on a worker slot the whole time they're waiting. Deferrable sensors/operators wait through the Triggerer instead, so they don't hog a worker for hours.

Interview tip: Sensor = wait until condition; prefer deferrable sensors for long waits.