BashOperator doen't run bash file apache airflow

后端 未结 3 801
猫巷女王i
猫巷女王i 2020-12-16 23:40

I just started using apache airflow. I am trying to run test.sh file from airflow, however it is not work.

Following is my code, file name is test.py



        
3条回答
  •  余生分开走
    2020-12-17 00:21

    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) 
    

提交回复
热议问题