Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 377
Abhishek Lodha Avatar asked Apr 20 '17 12:04

Abhishek Lodha


People also ask

Where are the example DAGs stored in Airflow?

In Airflow, a DAG is a collection of all the tasks you want to run, organized in a way that reflects their relationships and dependencies. The default DAGs directory is located at /opt/bitnami/airflow/dags.

How do I see the DAG in Airflow?

If you want to see a visual representation of a DAG, you have two options: You can load up the Airflow UI, navigate to your DAG, and select “Graph” You can run airflow dags show , which renders it out as an image file.


1 Answers

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.

like image 123
Abhishek Chandran Avatar answered Oct 25 '22 23:10

Abhishek Chandran