blob: 2d971bd5662bd3d3584dcb8bfe4e777c84c11f73 [file] [log] [blame]
:py:mod:`airflow.sensors.bash`
==============================
.. py:module:: airflow.sensors.bash
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.sensors.bash.BashSensor
.. py:class:: BashSensor(*, bash_command, env=None, output_encoding='utf-8', **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Executes a bash command/script and returns True if and only if the
return code is 0.
:param bash_command: The command, set of commands or reference to a
bash script (must be '.sh') to be executed.
:type bash_command: str
:param env: If env is not None, it must be a mapping that defines the
environment variables for the new process; these are used instead
of inheriting the current process environment, which is the default
behavior. (templated)
:type env: dict
:param output_encoding: output encoding of bash command.
:type output_encoding: str
.. py:attribute:: template_fields
:annotation: = ['bash_command', 'env']
.. py:method:: poke(self, context)
Execute the bash command in a temporary directory
which will be cleaned afterwards