jason810496 commented on issue #53053: URL: https://github.com/apache/airflow/issues/53053#issuecomment-3864014988
@BrianLii just asked me about how to filter AssetEvent by "manual, scheduler-created, via asset watcher". It seems that we have to follow how we implement `timetable_type`: https://github.com/apache/airflow/pull/58852,right? From my perspective: - It will not be a problem to filter out AssetEvents created by "scheduler-created" and "asset watcher", we are able to get them by joining - `AssetModel.scheduled_dags` and `AssetModel.watchers` - https://github.com/apache/airflow/blob/5fef6984c61fbf67d5567a4cdb4984662289212c/airflow-core/src/airflow/api_fastapi/core_api/routes/public/assets.py#L184-L193 - However, for "manual created AssetEvent", it seems the only way is to filter by `extra` - https://github.com/apache/airflow/blob/805a4750411d7a9e702ba944263d9832110ccfd6/airflow-core/src/airflow/api_fastapi/core_api/datamodels/assets.py#L174-L186 - In the case of timetables, we intent to avoid filtering in the `description` or `extra` field. So unless we are fine with filtering via `extra` json field, we have to implement `created_type` field on `AssetEvent` right? cc @uranusjr -- 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]
