DAGs being picked up from different location

I’m setting up airflow on windows 10 locally using WSL ubuntu. How can I set the default DAG path to /airflow/dags/

Here is my airflow.cfg file :

Here is the location from where it is picking up DAGs : (example_dag location)
/usr/local/lib/python3.8/dist-packages/airflow/example_dags/example_bash_operator.py

I have executed the export AIRFLOW_HOME=~/airflow/dags command.
Also, I have added above to ~/.bashrc and executed ‘source ~/.bashrc’ , but no luck.
Please help!

Airflow by default displays all the example dags along with your dags. set load_examples to False in your airflow.cfg file, for airflow to pick up DAGs only from your dags_folder path

https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#load-examples

1 Like