bolkedebruin opened a new issue, #50873:
URL: https://github.com/apache/airflow/issues/50873
### Apache Airflow version
3.0.1
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
I am playing around with Assets.
This is the generating DAG / Asset (Confusing!)
```
from airflow.sdk import Metadata, asset
@asset(uri="file:///tmp/example.csv", schedule=None)
def write_example(self):
with open("/tmp/example.csv", "w") as f:
f.write("Hallo")
yield Metadata(self, {"row_count": 0})
```
I have two consuming DAGs, one "asset" syntax based and one taskflow based:
```
from airflow.sdk import Asset, asset
from airflow.sdk import DAG, dag, task
write_example = Asset("write_example")
#@asset(schedule=None)
@dag
def my_dag():
@task
def consume_csv(write_example):
print("Bla")
my_dag()
```
and
```
from airflow.sdk import Asset, asset
from airflow.sdk import DAG, dag, task
@asset(schedule=None)
def consume_csv(write_example):
print("Bla")
```
Neither of the two DAGs generate a "consume" number at the write_example
asset / dag
### What you think should happen instead?
The number of consuming DAGs should read "2" for the "write_example" asset
### How to reproduce
see above
### Operating System
Linux
### Versions of Apache Airflow Providers
not relevant
### Deployment
Docker-Compose
### Deployment details
not relevant
### Anything else?
_No response_
### Are you willing to submit PR?
- [x] 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]