TemplateNotFound error when running simple Airflow BashOperator

You should try with space at the end of filepath. whichever operator you are using you should always follow the same rule.

load_mysql = BashOperator(  
             task_id='load_warehouse_mysql',  
             command='/home/deploy/airflow-server/task_scripts/orderwarehouse/load_warehouse_tables.sh ',  
             dag=orderwarehouse)  

in addition to all the answers provided i had to do something more to get rid of the jinja template not found issue.

we have to add space after the file name in task definition.

enter image description here


This is a pitfall of airflow. Add a space at the end of your bash_command and it should run fine

Source: https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=62694614

Tags:

Python

Airflow