Skip to content

Add dataset events to dataset api#25011

Closed
jedcunningham wants to merge 2 commits intoapache:mainfrom
astronomer:dataset_events_api
Closed

Add dataset events to dataset api#25011
jedcunningham wants to merge 2 commits intoapache:mainfrom
astronomer:dataset_events_api

Conversation

@jedcunningham
Copy link
Member

Add api endpoint to get events for a dataset.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Jul 13, 2022
@jedcunningham jedcunningham added changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) AIP-48 labels Jul 13, 2022
@jedcunningham jedcunningham marked this pull request as ready for review July 13, 2022 20:43
@provide_session
@format_parameters({'limit': check_limit})
def get_dataset_events(
id, *, limit: int, offset: int = 0, order_by: str = "created_at", session: Session = NEW_SESSION
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of just ordering, it may be useful to be able to filter by a dag_id

detail=f"The Dataset with id: `{id}` was not found",
)

allowed_attrs = ['task_id', 'dag_id', 'run_id', 'map_index', 'created_at']
Copy link
Contributor

Choose a reason for hiding this comment

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

should we allow sorting by map_index alone? Practically, I feel like really this would at least combine with the task_id, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree, generally, though we probably need to allow multiple order_by's and I don't want to intermix that here.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, this is fine for now. I just wanted to bring it up for later.

@jedcunningham
Copy link
Member Author

Closing in favor of #25039.

@jedcunningham jedcunningham deleted the dataset_events_api branch July 14, 2022 21:11
@eladkal eladkal added area:data-aware-scheduling assets, datasets, AIP-48 and removed AIP-48 labels Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:data-aware-scheduling assets, datasets, AIP-48 changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants