airflow icon indicating copy to clipboard operation
airflow copied to clipboard

[Filters] Add filters to Search - Assets

Open cmarteepants opened this issue 1 year ago • 12 comments

View

Search – Assets

Image

Filters to Add

  • Filter by Asset Group
    ↪ Narrow results to a logical grouping of assets (e.g., revenue_reporting, customer_metrics)

  • Filter by Consuming DAG and / or Producing Task
    ↪ Quickly locate assets by their upstream producer or downstream consumer

  • Filter by Last Event Timestamp (Range)
    ↪ Identify stale or recently updated assets

  • Filter by Is Alias (Yes/No)
    ↪ Distinguish between assets vs. placeholders

  • Filter by Has Events (Yes/No)
    ↪ Distinguish between assets with active data lineage vs inactive definitions

API Support

⚠️ Partial

  • The assets API supports filtering by:
    • dag_id, task_id, and sometimes group
  • Currently lacks:
    • Filtering by event presence (has_events)
    • Range filtering by last event timestamp

UI Impact

  • Add a filter panel above the asset list table
  • Useful in large deployments with hundreds or thousands of assets

Notes

  • Enables users to answer critical questions like:
    • “What assets are stale?”
    • “Which DAGs produce assets in this domain?”
  • Especially helpful when debugging broken pipelines or validating asset freshness

cmarteepants avatar Jul 08 '25 22:07 cmarteepants

Something similar here: https://github.com/apache/airflow/issues/47164.

jroachgolf84 avatar Jul 22 '25 12:07 jroachgolf84

Filter by Asset Group ↪ Narrow results to a logical grouping of assets (e.g., revenue_reporting, customer_metrics)

@cmarteepants, is there currently a way to assign an Asset to a "group"?

jroachgolf84 avatar Jul 22 '25 12:07 jroachgolf84

@jroachgolf84 there is an arg for it, but it's not currently being reflected in the UI. Probably 3.2 when we revamp it.

cmarteepants avatar Jul 23 '25 17:07 cmarteepants

Hey @cmarteepants and @jroachgolf84, I'd like to work on this. Can you please assign it to me? Additionally, issue #53053 is somewhat related. Can I also pick that up, along with this issue?

nikhil25803 avatar Jul 31 '25 20:07 nikhil25803

@nikhil25803, how are we progressing on this?

vatsrahul1001 avatar Aug 11 '25 04:08 vatsrahul1001

Hey @vatsrahul1001, I faced some issues while setting up the repo 😅, but I managed to do it. I'm working on it and will try to raise a PR by Sunday this week.

nikhil25803 avatar Aug 11 '25 15:08 nikhil25803

@nikhil25803 Great to hear, looking forward to it 🎉

pierrejeambrun avatar Aug 11 '25 22:08 pierrejeambrun

We need an order_by latest_asset_event_timestamp too. last_asset_event.timestamp

pierrejeambrun avatar Aug 21 '25 15:08 pierrejeambrun

@nikhil25803 We are unassigning you from this issue as part of our updated assignment policy.

This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

potiuk avatar Mar 02 '26 19:03 potiuk

@cmarteepants - what do you mean by this:

Filter by Asset Group ↪ Narrow results to a logical grouping of assets (e.g., revenue_reporting, customer_metrics)

Is there a way to specify an "Asset Group"? In the UI right now, it just says "asset".

jroachgolf84 avatar May 18 '26 12:05 jroachgolf84

Hi, I'd like to work on this.

The API doesn't yet support has_events or last-event-timestamp rangefiltering, so I'll scope my first PR to what's already there: Consuming DAG and Producing Task, following the pattern from the completed sibling issues under #53040.

Leaving Asset Group out for now, as @jroachgolf84's question about it is still open.

Ayan-Amir avatar Aug 11 '26 07:08 Ayan-Amir

Correction: Has Events is already merged (#72460), so I'm withdrawing — leaving the remaining filters to others. Sorry for the noise!

leslyvj avatar Nov 20 '26 04:11 leslyvj