tirkarthi opened a new issue, #44944: URL: https://github.com/apache/airflow/issues/44944
### Description Currently when API is used to create an asset event `from_rest_api` is set as `True` in `extra` for the `AssetEvent` . This helps in identifying the source. Similarly `from_trigger` can be set for asset events created as part of event based scheduling. This will also help in UI where `Trigger` can be mentioned as the source. Another idea but slightly bigger one would be to pass the event payload as extra to the asset event, this will help in passing information from the trigger to the dag that consumes the event. https://github.com/apache/airflow/blob/c77c7f003a2458698a1d5a440670b9728783ff78/airflow/api_connexion/endpoints/asset_endpoint.py#L350 `extra = {"from_trigger": True}` can be passed to `register_asset_change` https://github.com/apache/airflow/blob/c77c7f003a2458698a1d5a440670b9728783ff78/airflow/models/trigger.py#L246-L249 Sample usage in `Asset Events` widget in dashboard UI that I am developing  ### Use case/motivation Helps in identification of the event source from trigger like how it's done through API now. ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
