Skip to content

Implement context accessor for DatasetEvent extra - #38481

Merged
uranusjr merged 5 commits into
apache:mainfrom
astronomer:dataset-event-extra-context
Mar 29, 2024
Merged

Implement context accessor for DatasetEvent extra#38481
uranusjr merged 5 commits into
apache:mainfrom
astronomer:dataset-event-extra-context

Conversation

@uranusjr

@uranusjruranusjr commented Mar 26, 2024

Copy link
Copy Markdown
Member

See #37810 for details. This implements the dataset_events context key to add extra to a given dataset event that’s to be emitted by the task.

I can use some help with how to do the UI part.

Comment threadairflow/datasets/__init__.py Outdated
@uranusjr
uranusjrforce-pushed the dataset-event-extra-context branch from 54834d2 to 8380a93CompareMarch 26, 2024 07:36

@jscheffljscheffl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like the approach as proposed here. Besides the comments to the review, can I kindly request that the existing dataset example is extended such that the "new function" is used there as a good example? Benefit would also be that there is an example existing how to retrieve the extra when receiving the event. At the moment it is a bit complex for somebody trying to figure this out.

Comment threadairflow/models/taskinstance.py Outdated
Comment threaddocs/apache-airflow/authoring-and-scheduling/datasets.rst Outdated
Comment threaddocs/apache-airflow/authoring-and-scheduling/datasets.rst Outdated
Comment threadscripts/ci/pre_commit/pre_commit_template_context_key_sync.py Outdated
@uranusjr
uranusjrforce-pushed the dataset-event-extra-context branch from 47da435 to 2996db3CompareMarch 28, 2024 23:42
@uranusjr
uranusjr merged commit fce3a58 into apache:mainMar 29, 2024
@uranusjr
uranusjr deleted the dataset-event-extra-context branch March 29, 2024 02:06
@ephraimbuddyephraimbuddy added the type:new-feature Changelog: New Features label Mar 30, 2024
@vatsrahul1001vatsrahul1001 added this to the Airflow 2.10.0 milestone Jul 12, 2024
@bbovenzi

Copy link
Copy Markdown
Contributor

Covered in: #40871

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:documentationtype:new-featureChangelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@uranusjr@bbovenzi@potiuk@Lee-W@shrukul@jscheffl@ephraimbuddy@vatsrahul1001