Why can't we use promql for tables? This is even s...
# support
r
Why can't we use promql for tables? This is even shown in the docs screenshot for tables!
s
The table type is intended to show one aggregation value for the entire window. However, in the promql range query, it returns multiple points which further need to be aggregated, and in instant query, we get one value, but that confuses people because the range of time doesn't matter. If you are interested in using promql for tables, what were you thinking about plotting? Please help me understand more about what you are trying to achieve.
r
Im thinking about plotting something for which delta() Prometheus function is extremely more convenient than SQL
I already have a graph with delta, I just want a table from that graph
s
By that did you mean one row for each step interval and it's value?
r
No, I have a metric and right now I have a plot of delta(metric[5m]) with label format {{some_attr}}
I’d like something similar, but a table with one column for some_attr, and another for delta within the last 5 minutes
s
But the plot would have had X points based on the time range selected because it's range query. We need to "reduce" multiple values to one value for each row because you may want last but other cases it could be sum/max etc.. When "reduce to" functionality is enabled for prom queries then we can allow table on prom queries.