Way to limit show tag values to most recent?

so i’ve been dumping lots of dynamic data into influxdb - and i show them in grafana. i have a grafana template variable generated from the following query:

show tag values from airflow_dags with key = "dag_id";

of course, the list of different tag values keep on growing with time.

what i would like to do is to have grafana only show the me list of tag values that are in use over a certain time period. so my query would be something like:

show tag values from airflow_dags with key = "dag_id" WHERE time > now() - 12h

thoughts?

1 Like