BashOperator doen't run bash file apache airflow

谁说胖子不能爱 提交于 2019-11-29 04:21:50

Add a space after .sh it should work this is mentioned in the confluence page of airflow

t2 = BashOperator(
task_id='sleep',
bash_command="/home/batcher/test.sh", // This fails with `Jinja template not found` error
#bash_command="/home/batcher/test.sh ", // This works (has a space after)
dag=dag) 

use just the script path, without "sh": create_command = "/home/ubuntu/test/inst/scripts/test.sh"

also make sure that "airflow" user has permissions to execute "test.sh" script.

Try without the "sh" just set the command to "home/ubuntu/test/inst/scripts/test.sh"

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!