Abhishek Lodha
Abhishek Lodha

Reputation: 747

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.

Upvotes: 10

Views: 2553

Answers (2)

SMDC
SMDC

Reputation: 717

For those who are still looking for an answer, Airflow configuration file, aiflow.cfg has one line

load_example = True

It's good to get started, but you probably want to set this to FALSE and restart airflow by using airflow resetdb.

Upvotes: 10

Abhishek Chandran
Abhishek Chandran

Reputation: 1646

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.

Upvotes: 10

Related Questions