stroom icon indicating copy to clipboard operation
stroom copied to clipboard

Make SQL stats queries aggregate all data up to the largest time bucket

Open at055612 opened this issue 5 years ago • 1 comments

Sql stats stores data in multiple time bucket sizes, with more recent data in smaller buckets and older data in larger buckets. When querying this can mean a time series with non-uniform data due to the different time buckets, such that charting it becomes difficult.

It should be possible to make the query establish the max bucket size for the range of data being queried and then aggregate all other bucket sizes up to this level to provide a uniform dataset.

at055612 avatar May 15 '20 07:05 at055612

This could possibly be achieved using a table function but that would mean the user has to consciously select the table function to get data in uniform bucket sizes. I think it would be preferable for the normalising of the data to be done at the sql level or just above and for the normalisation to be the default, but with some form of configuration to turn if off to maintain compatibility with legacy dashboards.

There is currently no means in a dashboard to configure the query in a way that is specific to the datasource type, e.g. stats vs lucene. We would potentially need some way of the data source providing information on what configuration options is has and for the dash to present these to the user. This could be in a similar way to how configuration is done for visualisations.

at055612 avatar May 15 '20 09:05 at055612