char101 opened a new issue #20396:
URL: https://github.com/apache/airflow/issues/20396
### Description
**Problem**
It is not easy to rename dags.
**Suggestion**
It would be better if dag can have both id and name. Id could be some
guid/uuid. If not given then id can be generated. At least when required the id
can be queried from the database. This way we can change the dag name without
changing the id.
```python
DAG_ID = '76c9eb30-4f9c-4806-aad8-931c03679726'
DAG_NAME = 'test'
with DAG(dag_id=DAG_ID, dag_name=DAG_NAME, ...):
# some tasks
```
If I want to rename the dag then I can simply change the name and I can
still get the dag history and not running into the risk of backfilling the dag
again.
```python
DAG_ID = '76c9eb30-4f9c-4806-aad8-931c03679726'
DAG_NAME = 'test_edited'
with DAG(dag_id=DAG_ID, dag_name=DAG_NAME, ...):
# some tasks
```
### Use case/motivation
So that dag can be easily renamed.
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]