I am currently using Azure Time Series Insights to aggregate my data. It provides me a way to generate date histogram, where I could specify search span and bucket size. However, the result of buckets does not meet my expectation.
For example, if search span is from 2016-08-01T01:00:00.000Z to 2016-08-0 5T01:00:00.000Z, and bucket size is 1 day, then the result of buckets will be as follows,
from 2016-08-02T00:00:00.000Z to 2016-08-03T00:00:00.000Z,
from 2016-08-03T00:00:00.000Z to 2016-08-04T00:00:00.000Z,
from 2016-08-04T00:00:00.000Z to 2016-08-05T00:00:00.000Z.
I observe two behaviours from the result. First of all, first bucket is not aligned to search span, starting from 2016-08-01T01:00:00.000Z. Secondly, the head and the tail of search span are trunked, namely data from 2016-08-01T01:00:00.000Z to 2016-08-02T00:00:00.000Z and data from 2016-08-05T00:00:00.000Z to 2016-08-05T01:00:00.000Z are not covered.
On the contrary, I would expect first bucket to be aligned with the start of search span, and whole search span to be covered. Currently, I have to calculate buckets in the business logic and query multiple times concurrently, which will quickly reach the limit.
Such behaviour is applied to all time units, like seconds, minutes, hours and days. If I specify bucket size to be 7 days, the result of buckets will be aligned even to Monday.
Since I cannot find any documentation with respect to such behaviour, therefore, my question would be,
If possible, how to get the result as I expected?
If not, what is the recommanded service from Azure to achieve my goal?