Airflow Sensor: Difference between revisions
Jump to navigation
Jump to search
(→Poke) |
|||
Line 15: | Line 15: | ||
==Reschedule== | ==Reschedule== | ||
The sensor takes up a worker slot only when it's checking, and sleeps for a set duration between checks. | |||
==Smart Sensor== | ==Smart Sensor== |
Revision as of 22:22, 17 July 2022
External
- https://airflow.apache.org/docs/apache-airflow/stable/concepts/sensors.html
- https://airflow.apache.org/docs/apache-airflow/stable/concepts/smart-sensors.html
- https://airflow.apache.org/docs/apache-airflow/2.0.0/concepts.html#sensors
Internal
Overview
A Sensor is a subclass of Operator. Sensors wait for an external event to happen. When the event they are waiting for occurs, the tasks succeeds, so their downstream tasks can run. The sensors are primarily idle, and because of that, they have primarily three modes of running, that allows executing them with various degrees of efficiency: poke, reschedule and smart sensors.
Also see Deferrable Operators and Triggers.
Sensor Types
Poke
This is default run mode. The Sensor takes up a worker slot for its entire runtime.
Reschedule
The sensor takes up a worker slot only when it's checking, and sleeps for a set duration between checks.