-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Closed
Labels
area:corearea:data-aware-schedulingassets, datasets, AIP-48assets, datasets, AIP-48kind: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.0a3
If "Other Airflow 2 version" selected, which one?
No response
What happened?
Asset events are not created for subcalsses Model and Dataset
What you think should happen instead?
Asset events should be created for Asset subclasses also.
How to reproduce
Trigger a Dag having Asset defined using Asset, Dataset and Model classes and see asset event is created only for Asset class.
from datetime import datetime
from airflow.providers.standard.operators.empty import EmptyOperator
from airflow.providers.standard.operators.python import BranchPythonOperator
from airflow.sdk.definitions.asset import Asset
from airflow.decorators import dag
from airflow.sdk.definitions.asset import Model
from airflow.sdk.definitions.asset import Dataset
# these two will have downstream dags
left = Asset(name='asset_name')
right = Dataset(uri="asset_uri")
centre = Model(name="model_asset")
@dag(start_date=datetime(1970, 1, 1), schedule=None)
def asset_name_uri():
l = EmptyOperator(task_id="left", outlets=[left])
c = EmptyOperator(task_id="center", outlets=[centre])
r = EmptyOperator(task_id="right", outlets=[right])
l >> r >> c
asset_name_uri()Operating System
Linux
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
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
area:corearea:data-aware-schedulingassets, datasets, AIP-48assets, datasets, AIP-48kind: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