BashSensor

Apache Airflow Certified

Executes a bash command/script and returns True if and only if the return code is 0.

View on GitHub

Last Updated: May. 7, 2021

Access Instructions

Install the Apache Airflow provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

bash_commandRequiredstrThe command, set of commands or reference to a bash script (must be ‘.sh’) to be executed.
envdictIf 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)
output_encodingstroutput encoding of bash command.

Documentation

Executes a bash command/script and returns True if and only if the return code is 0.

Was this page helpful?