redash
redash copied to clipboard
Alerting/visualizing on row counts rather than just field values
It'd be great to have alerts which could trigger when the number of rows a query returns crosses a certain threshold. This would better support queries which return “suspicious” rows that need further investigation by a human. Currently to accomplish that, you basically need two queries: one for actually grabbing the data (that the human can look at) and one for triggering the alert which just aggregates the first with count() (or does something clever like inspect redash's own metadata about the first query). With two queries, there's lots of potential for divergence over time. You can also hack it by including a window function in your select list (such as row_number() over ()) and alerting on that, but it's kinda ugly.
The ability to use the number of rows a query returns, instead of a field value from a row, would also be useful for the Counter visualization type. It can be useful to show just the row count of a query on a dashboard, and disclose the query results upon clicking through.
I'd like to second this feature -- redash is almost perfect for our use case except we have non-SQL literate people using it who need to be able to visualize aggregates as well as values based on queries engineering writes.
Closing. #1619
Hey, this feature still isn't resolved, the row counter is only in counter visualization but not in alerts. Can you reopen it, please?
It would be great to have this on the query api as well. For example I have redash integrated with our own internal reporting system.. The internal reporting app can schedule running of reports, and exporting to excel and attaching to a email. If the result of the query is zero rows, I'd like to not send out the email, so that it can be used for exception reporting, when there is actual useful data available.
Thanks!
Would also be nice to have as a limiter for queries in general so users don't OOM the instance on some troublesome datasets with light data but a lot of rows