Open demestav opened 5 years ago
You're correct, that's not possible at the moment, nor do we have concrete plans to implement that feature. It is usually a need coming from visualization tools, is that your case? Which is your most used case b.t.w?
Working around the issue should not be too complex. I'm thinking it could be done querying a finer-grain period and doing some post-processing of the results; a bit trickier for cases like avg though.
Implementing this would require some time, as there's no direct support from databases (that I know), so it would require either some special manipulation with the db queries or some advanced post-processing leveraging on frameworks (I'm thinking things like '2m' in pandas timeseries).
I'm fine keeping the issue open to continue the discussion in future, but unfortunately for now we cannot work on this one.
In my opinion, this would benefit both visualization and analysis, since data coming from different devices can have different period and offset. Having a synchronous reference point can be achieved with aggregation, and this offers a unified approach to analyze the data with algorithms that might be tuned for a specific periodicity.
I know InfluxDB supports this out of the box (https://docs.influxdata.com/influxdb/v1.7/query_language/spec/#durations). It is unfortunate that QL dropped support for InfluxDB.
@demestav there is a quite large number of reasons influxdb was dropped, main ones being:
said so, this is an open source project, you can contribute to it with features relevant to you. not that we will never implement features requested by the community, simply given that we have internal priorities driven by our customers and use cases, we give priority to that.
@chicco785 Thank you for the details. If we end up implementing something, of course I will submit a pull request. In the meantime, is there a process to submit feature request? Or is this issue enough to count as one?
yes, this count as feature request :)
Stale issue message
There are a number of available aggregation periods supported: https://github.com/smartsdk/ngsi-timeseries-api/blob/f004386e566eb855f5bb4e5b4df1023c1def2a5e/src/translators/crate.py#L52
Is it possible to have multiples of those values, for example 5 minutes? I couldn't find any documentation about that.
It would certainly be a useful feature to have.