When running Airflow server for the first time after installation, in the DAG list, there is already some dags, such as "example_dash_operator", "example_branch_labels", etc.
Airflow doc says that, to create our own DAGs, we should put in a dags
folder, which should be in this location AIRFLOW_HOME/airflow/dags/
(AIRFLOW_HOME
is the folder where I install Airflow). I put a sample dag1.py
in this folder. But after re-logging in into localhost:8080
, I still see only the standard list of DAGS after installation. I don't see dag1.py
. I have both the server and the scheduler running with :
airflow webserver --port 8080
airflow scheduler
The full folder structure is as following:
\AIRFLOW_HOME\
airflow\
airflow-webserver.pid
airflow.db
logs\
airflow.cfg
dags\
dag1.py
webserver_config.py
This thread here advised to run airflow dags list
first. dag1.py
does not appear on the list when I run that command. And, after running that, restarting the server and scheduler, the web UI still does not list dag1.py
in airflow.cfg
, I have this line defining the dags
folder:
dags_folder = /xxxxxx/airflow/dags
where the xxxxxx
is the absolute path of AIRFLOW_HOME
.
The content of dag1.py
is code copied from a tutorial in this Youtube. So I think it is a valid dag.
What am I missing?