Skip to content

[Filters] Add filters to Asset View #53053

Closed

Description

@cmarteepants

View

Asset View

Image

Filters to Add

  • Filter by Event Timestamp (Range)
    ↪ Focus on recent or historical asset events within a specific window

  • Filter by DAG ID
    ↪ Isolate events triggered by a specific DAG

  • Filter by Task ID
    ↪ Track asset events back to the producing task

  • Filter by Event Type (e.g., manual, scheduler-created, via asset watcher)
    ↪ Differentiate programmatic updates from ad-hoc, scheduler created or asset events created via asset watchers

API Support

⚠️ Partial

  • The asset_events API includes all fields, but filtering is not fully implemented or exposed in the UI
  • Some filters (e.g., timestamp range) may need to be implemented on the backend or via query parameters

UI Impact

  • Add a filter bar or collapsible panel above the event list
  • Improves readability and analysis of high-volume asset event streams

Notes

  • Especially useful in asset-triggered DAGs and debugging incorrect lineage or asset duplication

Activity

  1. added
    kind:meta
    kind:feature
    area:UI
    and removed
    kind:meta
    on Jul 8, 2025
  2. added
    area:API
    on Jul 8, 2025
  3. BrianLii commented on Aug 8, 2025

    @BrianLii
    Contributor

    May I take this issue?

  4. added this to the Airflow 3.1.0 milestone on Aug 11, 2025
  5. pierrejeambrun commented on Aug 11, 2025

    @pierrejeambrun
    Member

    Go ahead @BrianLii, this is targetted for 3.1.0 and should be done be ready by the end of August. Can you confirm that you will be able to close it by then? Also feel free to split it into smaller pull request (1 per filter maybe) so it's easier to merge and iterate on incremental change.

  6. BrianLii commented on Aug 11, 2025

    @BrianLii
    Contributor

    Got it. I think I can make it!

  7. pierrejeambrun commented on Aug 21, 2025

    @pierrejeambrun
    Member

    We should also add ordering based on latest_asset_event_timestamp to the endpoint.

  8. 1 remaining item

  9. pierrejeambrun commented on Sep 11, 2025

    @pierrejeambrun
    Member

    @BrianLii Do you plan to continue your work towards closing this issue? We are missing the event type filter.

  10. BrianLii commented on Sep 11, 2025

    @BrianLii
    Contributor

    Yes, I'm working on modifying APIs for the event type filters.

  11. jason810496 commented on Feb 7, 2026

    @jason810496
    Member

    @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: #58852?

    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
      • # The below type annotation is acceptable on SQLA2.1, but not on 2.0
        assets_rows: Result[Unpack[tuple[AssetModel, int, datetime]]] = session.execute( # type: ignore[type-arg]
        assets_select.options(
        subqueryload(AssetModel.scheduled_dags),
        subqueryload(AssetModel.producing_tasks),
        subqueryload(AssetModel.consuming_tasks),
        subqueryload(AssetModel.aliases),
        subqueryload(AssetModel.watchers).joinedload(AssetWatcherModel.trigger),
        )
        )
    • However, for "manual created AssetEvent", it seems the only way is to filter by extra
      • class CreateAssetEventsBody(StrictBaseModel):
        """Create asset events request."""
        asset_id: int
        partition_key: str | None = None
        extra: dict = Field(default_factory=dict)
        @field_validator("extra", mode="after")
        def set_from_rest_api(cls, v: dict) -> dict:
        v["from_rest_api"] = True
        return v
        model_config = ConfigDict(extra="forbid")
      • 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

  12. removed this from the Airflow 3.3.0 milestone on Jun 15, 2026
  13. bbovenzi commented on Oct 1, 2026

    @bbovenzi
    Contributor

    Closing as done. We only don't have asset event type but that's not an easily supported filter yet. (asset_event doesn't have a type value)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:APIarea:UIgood first issuekind:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions