What product/components do you use and which version/fix level are you on?
cumulocity
Is your question related to the free trail, or to a production (customer) instance?
Customer license
What are you trying to achieve? Please describe in detail.
Why the measurement java sdk returns only parts of the data within a date and within a hour also?
I am trying to fetch the mesurements of a day using the measurements API of java sdk through the measurementapi. But everytime i fetch a single day’s records, I get inconsistent data.
For example:
For 13th hour I get measurements of 13.00, 13:05,13:10, 13:15, 13:20, 13:25, 13:30, 13:40, 13:50. Missing are 13:35, 13:45, 13:55.
During the next immediate fetch for the same 13th hour it returns only 13:00, 13:10, 13:20, 13:30, 13:40, 13:50 only (for every alternate 5 mins)
Why is this inconsistency? AM I doing anything wrong?
My code snippet below:
final MeasurementFilter filter1 = new MeasurementFilter().bySource(new GId(deviceId)).byValueFragmentType(valueFragmentType).byDate(dateFrom.toDate(), dateTo.toDate());
final Iterable measureArrColl = measurementApi.getMeasurementsByFilter(filter1).get(5000,RevertQueryParameter.getInstance()).allPages();
LOGGER.info("measureArr1 "+measureArr1);
At the same time, if I use RestTemplate calls to the measurements API of cumulocity I am able to fetch all the records for an hour and for a day or any date range supplied.
Also, please help if there is a way to sort the data fetched using measurmentapi java sdk?
Do you get any error messages? Please provide a full error message screenshot and log file.
No