I am new to Apache Airflow, and I plan to run Python and R script files using the BashOperator class. I want to understand how Exceptions should work in two situations:
1. The R or Python script fails for some reason; or
2. The R or Python script completes but I want to require human input before the DAG proceeds to the next task.
I have two very basic questions:
1. How does an Exception get passed from an R or Python script file to the BashOperator to the DAG? For example, should the call to an R script file be inside a try block in the BashOperator?
2. How do I pass a custom exception (warning? error?) so that even if the R or Python script completes successfully, I can pause execution of the DAG?
I'd appreciate any examples of Airflow exception handling that you could point me to.