Apache Airflow DAG cannot import local module

前端 未结 3 1234
南笙
南笙 2021-01-01 10:48

I do not seem to understand how to import modules into an apache airflow DAG definition file. I would want to do this to be able to create a library which makes declaring ta

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 10:57

    Adding the sys path again worked for me,

    import sys
    sys.path.insert(0,os.path.abspath(os.path.dirname(__file__)))
    

提交回复
热议问题