Search code examples
python-2.7webserverairflow

Airflow admin UI shows example dags


I am trying to setup Airflow on my system locally. I have used:

export AIRFLOW_HOME=~/Documents/Project/airflow

Then I have initialized airflow db by

airflow initdb

Then I started airflow web server using :

airflow webserver -p 8080

Now when I open localhost:8080, the admin panel shows example dags from /usr/local/lib/python2.7/dist-packages/airflow/example-dags and not from ~/Documents/Project/airflow/dags folder.

Whereas airflow list_dags on command line shows dags from my project folder.

Could not figure out the reason. Please help.


Solution

  • Apart from export path mentioned, airflow by default also creates a folder in your home directory when you run airflow initdb. Hence it will use config file from home directory, so in order to load your DAGs, delete airflow folder from home directory.