How to add new DAGs to Airflow?
I think the reason for this is because you haven't exported AIRFLOW_HOME
.Try doing:AIRFLOW_HOME="/home/alex/airflow/dags" airflow list_dags
.If that's not working than do two stepsexport AIRFLOW_HOME="/home/alex/airflow/dags"airflow list_dags
I believe this should work. Give it a go?
In my understanding, AIRFLOW_HOME
should link to the directory where airflow.cfg
is stored. Then, airflow.cfg
can apply and set the dag directory to the value you put in it.
The important point is : airflow.cfg
is useless if your AIRFLOW_HOME
is not set
The issue is that you might have two airflow configs existing in your directories, so check for /root/airflow/dags and if yes you require to change the dags_folder path in both airflow.cfg s