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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With