BashSensor

Apache Airflow Certified

Executes a bash command/script.

View on GitHub

Last Updated: Mar. 15, 2023

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

Documentation

Executes a bash command/script.

Return True if and only if the return code is 0.

See also

For more information on how to use this sensor,take a look at the guide: BashSensor

Was this page helpful?