Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow dataset alias to add more than one dataset events #42189

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Sep 12, 2024

Why

#34206 (comment)

@task(outlets=[DatasetAlias("example-alias")])
def produce_dataset_events(*, outlet_events):
    outlet_events["example-alias"].add(Dataset("dbt-cloud-table-1"))
    outlet_events["example-alias"].add(Dataset("dbt-cloud-table-2"))

could be confusing if only the second one create a dataset event

What

Save all the datasets when add is invoked.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

airflow/utils/context.py Outdated Show resolved Hide resolved
airflow/utils/context.py Outdated Show resolved Hide resolved
Copy link
Member

@uranusjr uranusjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General idea looks good to me, some notes on implementation.

@Lee-W Lee-W force-pushed the allow-multiple-dataset-alias-events branch from 9ef6820 to bf648e9 Compare September 12, 2024 19:46
@Lee-W Lee-W force-pushed the allow-multiple-dataset-alias-events branch from e38cf28 to 35c5651 Compare September 12, 2024 21:19
@Lee-W Lee-W merged commit a5d0a63 into apache:main Sep 16, 2024
80 checks passed
@Lee-W Lee-W deleted the allow-multiple-dataset-alias-events branch September 16, 2024 09:44
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Sep 16, 2024
@utkarsharma2 utkarsharma2 added this to the Airflow 2.10.2 milestone Sep 16, 2024
utkarsharma2 added a commit that referenced this pull request Sep 16, 2024
@utkarsharma2 utkarsharma2 added the type:bug-fix Changelog: Bug Fixes label Sep 17, 2024
utkarsharma2 added a commit that referenced this pull request Sep 17, 2024
gopidesupavan pushed a commit to gopidesupavan/airflow that referenced this pull request Sep 17, 2024
joaopamaral pushed a commit to joaopamaral/airflow that referenced this pull request Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants