airflow.decorators.sensor
¶
Module Contents¶
Classes¶
Wraps a Python callable and captures args/kwargs when called for execution. |
Functions¶
|
Wrap a function into an Airflow operator. |
- class airflow.decorators.sensor.DecoratedSensorOperator(*, task_id, **kwargs)[source]¶
Bases:
airflow.providers.standard.sensors.python.PythonSensor
Wraps a Python callable and captures args/kwargs when called for execution.
- Parameters
python_callable – A reference to an object that is callable
task_id (str) – task Id
op_args – a list of positional arguments that will get unpacked when calling your callable (templated)
op_kwargs – a dictionary of keyword arguments that will get unpacked in your function (templated)
kwargs_to_upstream – For certain operators, we might need to upstream certain arguments that would otherwise be absorbed by the DecoratedOperator (for example python_callable for the PythonOperator). This gives a user the option to upstream kwargs as needed.
- template_fields: collections.abc.Sequence[str] = ('op_args', 'op_kwargs')[source]¶
- shallow_copy_attrs: collections.abc.Sequence[str] = ('python_callable',)[source]¶