-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quantumleap is joining all time-series for all attributes for entity type in one table. #738
Comments
Hello @Greenstreet123 :-) So sorry for the late reply, but work has been hectic and this issue fell through the cracks. My bad.
No, you're not doing anything wrong. Your problem is an unfortunate side-effect of our DB design. Each NGSI entity instance gets a single timestamp index in the DB. The reason for that is lost in time but I think the rationale behind it is that we were catering for the most common case where a device measures a whole bunch of params at the same time, sends this batch of measurements on to an IoT agent and the agent packs them into an NGSI entity, one attr per measurement. To sum up
Like you have rightly noticed, this only makes sense if all the measurements where taken at the same time
Unfortunately not. It's quite a big change and we don't have the budget for that at the moment.
I agree with you that a more flexible model where we don't assume a single time index for all the attrs would be better, but like I said it's quite a departure from the current design.
Contribs are most welcome! Anyway, one easy workaround would be to group measurements into entities in such a way that measurements taken at different times are in different entities. For example, if a device measures temperature every 10 mins and humidity every 30 mins, you could have two separate entities one for temperature and the other for humidity. |
Hey there, if I understood your problem correctly, you see "fake measurements" because the context broker notifies quantumleap this way. Afaik, NGSI-LD does not support this feature. |
ha! thanks for clarifying @SBlechmann, I wasn't sure where those "fake" measurements came from :-) |
Thanks for coming back. For us it was not possible to use it QL as is. Too many issues unfortunately. Regarding "onlyChangedAttrs", when we used it there were a lot of NULL values in the series, and when filtering (min/max/avg, by time) the API started to be buggy. |
@Greenstreet123 sorry to hear about your trouble with QL. But thank you so much for your honest feedback. We definitely agree with you we should improve our data model :-) |
Hello
We are using Quantumleap and we have entities in context broker with multiple attributes that may have different timestamps.
The the main question is why Quantumleap is joining all time-series for all attributes for entity type in one table.
Attributes have different timestamps, but in this table structure we will lose this information.
On data fetch we will get "fake" measurement points for time series.
As result we have a lot of useless duplicate data in the database. This affects speed too, mainly on REST API level, because of fetching a lot of useless data.
First I wanted to ask if this is to be expected or if we are using it in an incorrect way?
Secondly, if the above is the case, is there any current work in progress to improve this? If not, would you think that something needs to be done and we should look into it making some development for this.
The text was updated successfully, but these errors were encountered: