DennisLi
DennisLi

Reputation: 4154

Airflow Dag id zhihu_qr_dag is still in DagBag. Remove the DAG file first

When I try to delete the dag in Web UI, it turned out: enter image description here

 Dag id zhihu_qr_dag is still in DagBag. Remove the DAG file first.

But actually the dag is an invalid dag, I can't enter the dag page. when I click the dag, it showed:

DAG "zhihu_qr_dag" seems to be missing.

How can I handle this? Thanks in advance!

Upvotes: 3

Views: 1068

Answers (3)

Chris Ivan
Chris Ivan

Reputation: 556

For anyone who stumbles on this issue, who can't delete a DAG no matter what they do, don't forget to check the DAG IDs as defined in your DAG files. If you've copy/pasted code between files, you might have left a DAG ID that you wanted to delete, but which now doesn't correspond to the file's name itself. Airflow only displays by DAG ID so it's easy to delete the file corresponding to that name but forget you have the ID in some other file.

Upvotes: 2

Surya Venkatapathi
Surya Venkatapathi

Reputation: 336

I have experienced this scenario, the dag folder should contain zhihu_qr_dag. It should be removed first.

Upvotes: 0

slesh
slesh

Reputation: 2007

Just rename the related dag file and that you will be able to remove the dag from adming panel.

Upvotes: 2

Related Questions