BashSensor

Apache Airflow Certified

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

View Source

Last Updated: Apr. 27, 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_commandstrThe 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.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?