orchestracities / ngsi-timeseries-api

QuantumLeap: a FIWARE Generic Enabler to support the usage of NGSIv2 (and NGSI-LD experimentally) data in time-series databases
https://quantumleap.rtfd.io/
MIT License
38 stars 49 forks source link

Multiples of aggregation period #175

Open demestav opened 5 years ago

demestav commented 5 years ago

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.

taliaga commented 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.

demestav commented 5 years ago

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.

chicco785 commented 5 years ago

@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.

demestav commented 5 years ago

@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?

chicco785 commented 5 years ago

yes, this count as feature request :)

github-actions[bot] commented 3 years ago

Stale issue message