-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Open
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release
Milestone
Description
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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
affected_version:3.0Issues Reported for 3.0Issues Reported for 3.0area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a releaseBug that should be fixed before next release but would not block a release