I have a Git repository which (among other things) holds Airflow DAGs in airflow
directory. I have a clone of the repository besides an install directory of Air
Re-writing conclusion from discussions here
Broadly, there are 2 possible ways
Make your code discoverable to dag-definition-file(s) parsing processes by updating PYTHONPATH
. Here again we have following options
(a) Update PYTHONPATH
on system level using bashrc / equivalent (once-and-for-all) or just export the updated PYTHONPATH for current bash session
(b) Programmatically update sys.path in the beginning of DAG-definition file