Azure TSI Gen2 getEvents API return timestamps out-of-order

祁 磊 26 Reputation points
2021-03-02T10:02:11.723+00:00

When I switch from tsi gen1 to tsi gen2, I found that the timestamps data in the getEvents API returned result is not strictly sorted. How do I add a sort field to tsigen2? Can anyone give some suggestions?

post url : https://xxxxx.env.timeseries.azure.com/timeseries/query?api-version=2020-07-31

result sample:

"timestamps": [
"2021-02-20T00:00:23Z",
"2021-02-20T00:01:23Z",
"2021-02-20T00:02:23Z",
"2021-02-20T00:03:23Z",
......
"2021-02-20T23:57:28Z",
"2021-02-20T23:58:28Z",
"2021-02-20T23:59:28Z",
"2021-02-21T00:00:28Z",
"2021-02-21T00:01:28Z",
"2021-02-21T00:02:28Z",
"2021-02-21T00:03:28Z",
......
"2021-02-21T09:39:30Z",
"2021-02-21T09:40:30Z",
"2021-02-21T09:41:30Z",
"2021-02-21T09:42:30Z",
"2021-02-23T04:28:44Z",
"2021-02-23T04:29:44Z",
"2021-02-23T04:30:44Z",
"2021-02-23T04:31:44Z",
......
"2021-02-23T23:53:47Z",
"2021-02-23T23:54:47Z",
"2021-02-23T23:55:47Z",
"2021-02-23T23:56:47Z",
"2021-02-23T23:57:47Z",
"2021-02-23T23:58:47Z",
"2021-02-23T23:59:47Z",
"2021-02-21T09:43:30Z",
"2021-02-21T09:44:30Z",
"2021-02-21T09:45:30Z",
"2021-02-21T09:46:30Z",
"2021-02-21T09:47:30Z",
"2021-02-21T09:48:30Z",
......
"2021-02-21T23:56:32Z",
"2021-02-21T23:57:32Z",
"2021-02-21T23:58:32Z",
"2021-02-21T23:59:32Z",
"2021-02-22T00:00:32Z",
"2021-02-22T00:01:32Z",
"2021-02-22T00:02:32Z",
"2021-02-22T00:03:32Z",
"2021-02-22T00:04:32Z",
"2021-02-22T09:01:33Z",
......
"2021-02-22T23:57:43Z",
"2021-02-22T23:58:43Z",
"2021-02-22T23:59:43Z",
"2021-02-23T00:00:43Z",
"2021-02-23T00:01:43Z",
"2021-02-23T00:02:43Z",
"2021-02-23T00:03:43Z",
"2021-02-23T00:04:43Z",
......
"2021-02-23T04:25:44Z",
"2021-02-23T04:26:44Z",
"2021-02-23T04:27:44Z"
],

  ...... represents the omitted data, in the correct order
Azure Time Series Insights
Azure Time Series Insights
An Azure internet of things (IoT) analytics platform to monitor, analyze, and visualize industrial IoT analytics data at scale.
78 questions
{count} vote

Accepted answer
  1. QuantumCache 20,271 Reputation points
    2021-03-02T19:53:35.47+00:00

    Hello @祁 磊 Thanks for posting this great question which is useful to others as well.

    Below is the quick response from the Microsoft Product Team to your query. I hope this clarifies your initial question.

    This is expected behavior, the Gen2 GetEvents API does not have a sort functionality yet. This is something on our roadmap to add but we don't have any ETA.

    Please comment in the below section if you need further help in this matter.

    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.