Is it possible to query a single TimeSeriesId with something like filter max($event.timestamp) to get only the latest collected data (measurements from a single sensor)? I don't have any environment, we're just making a proof of concept through Postman to check if we can make the same queries as we do in current CosmosDb environment.
The model is for instance something like that, the sensor is feeding the data every 2 minutes and I need only the last measurement:
Is that currently possible?
UPDATE/
I have found one way to do it. The request is for aggregateSeries:
As long as I make the interval 'wider' than the searchspan, I can retrieve the last value using aggregate last(value).
Is it the optimal way, tho? Also this method requires to last(value) every measured property I need to collect which is doable but not very convenient.
Is it possible to query a single TimeSeriesId with something like filter max($event.timestamp) to get only the latest collected data (measurements from a single sensor)? I don't have any environment, we're just making a proof of concept through Postman to check if we can make the same queries as we do in current CosmosDb environment.
The model is for instance something like that, the sensor is feeding the data every 2 minutes and I need only the last measurement:
Is that currently possible?
UPDATE/
I have found one way to do it. The request is for aggregateSeries:
As long as I make the interval 'wider' than the searchspan, I can retrieve the last value using aggregate last(value). Is it the optimal way, tho? Also this method requires to last(value) every measured property I need to collect which is doable but not very convenient.