MatrixManAtYrService opened a new issue, #26381:
URL: https://github.com/apache/airflow/issues/26381

   ### Apache Airflow version
   
   main (development)
   
   ### What happened
   
   Here's a simple pair of dags linked by a dataset:
   
   ```python3
   from datetime import datetime
   from airflow import Dataset
   from airflow.operators.empty import EmptyOperator
   from airflow.decorators import dag
   
   dataset = Dataset("dataset")
   
   @dag(start_date=datetime(1970, 1, 1))
   def upstream():
       EmptyOperator(task_id="empty", outlets=[dataset])
   
   upstream()
   
   
   @dag(start_date=datetime(1970, 1, 1), schedule=[dataset])
   def downstream():
       EmptyOperator(task_id="empty")
   
   downstream()
   ```
   
   I let airflow parse this, then I made the following edit:
   ```python3
   d̶a̶t̶a̶s̶e̶t̶ ̶=̶ ̶D̶a̶t̶a̶s̶e̶t̶(̶"̶d̶a̶t̶a̶s̶e̶t̶"̶)̶
   dataset = Dataset("dataset1")
   ```
   
   I let airflow parse it again, then I made another edit:
   ```python3
   d̶a̶t̶a̶s̶e̶t̶ ̶=̶ ̶D̶a̶t̶a̶s̶e̶t̶(̶"̶d̶a̶t̶a̶s̶e̶t̶1̶"̶)̶
   dataset = Dataset("dataset2")
   ```
   
   Then I viewed the datasets page:
   <img width="675" alt="Screen Shot 2022-09-14 at 12 07 08 AM" 
src="https://user-images.githubusercontent.com/5834582/190073533-ebd4cb54-e080-4de5-9d95-9adf3c6c0a74.png";>
   
   Notice that instead of updating the name of the dataset, as I intended, I 
ended up creating three datasets.
   
   
   
   
   ### What you think should happen instead
   
   If there are no dags which reference a dataset, it should not be shown in 
the dataset list
   
   ### How to reproduce
   
   update a dataset URI
   
   ### Operating System
   
   docker/debian
   
   ### Versions of Apache Airflow Providers
   
   n/a
   
   ### Deployment
   
   Astronomer
   
   ### Deployment details
   
   `astro dev start`
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit 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]

Reply via email to