devx
devx

Reputation: 5

Unable to create dag with apache airflow

I am running airflow 2.0, setting up airflow dag for the first time, and following quick start tutorials.

After creating and running the py file I don't see the dag created it does not list for me.

setting: airflow.cfg:dags_folder = /Users/vik/src/airflow/dags my python file is in this folder. There are no errors here.

I am able to see the example dags in example-dags.

I did airflow db init airflow webserver airflow scheduler then try to list the dags I think I am missing something

Upvotes: 0

Views: 1222

Answers (2)

NicoE
NicoE

Reputation: 4873

A few things to try:

  • Make sure the scheduleris running (run airflow scheduler) or try to restart it .
  • Using the Airflow CLI, run airflow config list and make sure that the loaded config is in fact what you are expecting, check the value of dags_folder.
  • Try running airflow dags list from the CLI, and check the the filepath if your dag is shown in the results.
  • If there was an error parsing your DAG, and therefore could not be loaded by the scheduler, you can find the logs in ${AIRFLOW_HOME}/logs/scheduler/${date}/your_dag_id.log

Upvotes: 0

bruno-uy
bruno-uy

Reputation: 1875

I don't know exactly how you installed everything, but I highly recommend Astronomer CLI for simplicity and quick setup. With that you'll be able to setup a first DAG pretty quickly. Here is also the video tutorial that helps you understand how to install / setup everything.

Upvotes: 0

Related Questions