BigData / Apache Airflow Interview Questions
What are Sensors in Apache Airflow?
Sensors are a special type of operator that wait for a certain condition to become true before proceeding. They poke the condition at a configurable interval (poke_interval) and either block (poke mode) or release the worker slot between polls (reschedule mode).
Common sensors:
- FileSensor — waits until a file appears on the filesystem.
- S3KeySensor — waits for an object key to exist in S3.
- HttpSensor — polls an HTTP endpoint until a condition is met.
- ExternalTaskSensor — waits for a task in another DAG to succeed.
Using mode='reschedule' is best practice for long waits to avoid holding worker slots idle.
More Related questions...