Airflow admin user interface shows dags example

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

export AIRFLOW_HOME=~/Documents/Project/airflow 

Then I initialized the db airflow to

 airflow initdb 

Then I started the airflow web server using:

 airflow webserver -p 8080 

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

While airflow list_dags on the command line displays dags from my project folder.

Failed to find out the reason. Please, help.

+5
source share
2 answers

In addition to the export path mentioned, the default airflow also creates a folder in your home directory when starting airflow initdb . Therefore, it will use the configuration file from the home directory, therefore, to download your DAG, delete the airflow folder from the home directory.

+8
source

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

 load_example = True 

It’s good to start, but you probably want to set the value to FALSE and restart the air flow.

+1
source

Source: https://habr.com/ru/post/1266964/


All Articles