1

I had to change the schedule interval of airflow dag in the middle.

The cron job of the schedule interval was modified, but the changed cron job was not reflected.

I got a question about this, so I looked up the issue, and found an answer about changing the name of dag_id.

But if you change the dag_id, you can't see the log of the dag_id before the change on the Web UI, right?

For example, if the original version was my_dag, the version to be changed would be my_dag_v2, but is it true that the log of my_dag cannot be checked?

If I understand correctly, the name of the dag_file is not changed, only the dag_id is changed. Is there a way to change only the schedule interval while using the same dag_id?

I'm concerned that I can't figure out the log for the old dag, so I guess I can't inadvertently change the dag_id.

If anyone knows about this issue, could you please reply?

1 Answers1

2

According to this documentation:

Changing schedule interval always requires changing the dag_id

What you can do is copy the original DAG script, change the file name and dag_id, set the needed schedule interval and the start date, and add this copy as a new DAG. Then you can disable the old DAG and keep it to be able to access the logs from the Web UI.

SergiyKolesnikov
  • 7,369
  • 2
  • 26
  • 47
  • Now I checked the answer. I saw this document, but I posted a question because I was wondering if there is another way. I was wondering if changing the dag_id is the only answer. thank you for the reply! –  Sep 12 '21 at 11:45