The aggregateWindow function is unable to retrieve data at the time interval specified by the step value

Issue

I am retrieving data using the aggregateWindow function in influxDB, but depending on the step value, data cannot be retrieved at the specified time interval.
I would like to know why the data cannot be obtained at equal intervals depending on the value of step.

Input data

From 2021/11/29T00:00:00+00:00 to 2022/02/28T00:00:00+00:00
Submitted one minute at a time.

Successful acquisition query

Failed acquisition queries

“210m” is entered in “Step”, but the second data was taken two hours after the first data. (Subsequent data will be acquired at 3.5 hour intervals.)

Query Comparison Results

What could cause these two differences?

Hello @kenkiYamazaki,
Can you please share your query?
Can you please export some of your data to annotated CSV to highlight where that doesn’t work? Or a screenshot of the table output?
I’m curious to see what the _start and _stop columns are showing.
They should show:
_start _stop
2021-11-29T00:00:00Z 2021-11-29T03:30:00Z

For the first row.

Thank you.

FWIW I made a mistake here:

I’m curious to see what the _start and _stop columns are showing.
They should show:
_start _stop
2021-11-29T00:00:00Z 2021-11-29T03:30:00Z

I meant I expected to see that for the window() function.

Have you tried the timeSrc being “_stop” instead? Like so:

  |> aggregateWindow(every: 210m, fn: first, timeSrc: "_stop", createEmpty: false)

?
Thanks

@Anaisdg ,Thanks for the reply.

I meant I expected to see that for the window() function.

I am sorry I do not understand what you are trying to do.
I tried using the Window function, but the result seems to be the same as the aggregateWindow function.

from(bucket: "AlexTest")
  |> range(start: 2021-11-29T00:00:00+00:00, stop: 2022-02-28T00:00:00+00:00)
  |> filter(fn: (r) => r["_measurement"] == "CsvStepTest")
  |> filter(fn: (r) => r["_field"] == "valueNumeric")
  |> window(every: 210m, period: 1s, offset: 0m, timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: false)

Have you tried the timeSrc being “_stop” instead? Like so:

Thanks, I tried this one too, but the time I was able to get was after 2 hours.

Sorry for the ongoing investigation, but is this phenomenon caused by our environment (time zone, input data, etc.)?

In the environment of other users or @Anaisdg 's environment, are they able to get data at the same interval as the time entered in “every” without any problem?

Hello @kenkiYamazaki,
Yes they work similarly. I just wanted to see if your data is able to be windowed correctly. Which i can’t see with aggregateWindow because it essentially performs an additional group. Can you share a screenshot with window()?

I’m not sure what’s going on here.
@Jay_Clifford Can you spot what I’m missing?

@ Anaisdg

Thank you very much for your reply.

Below is a screenshot of the Window().

from(bucket: "AlexTest")
  |> range(start: 2021-11-29T00:00:00+00:00, stop: 2022-02-28T00:00:00+00:00)
  |> filter(fn: (r) => r["_measurement"] == "CsvStepTest")
  |> filter(fn: (r) => r["_field"] == "valueNumeric")
  |> window(every: 210m, period: 1s, offset: 0m, timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: false)

If you do not see what you want to check, please contact us and we will take another shot, sorry.

Also, @Jay_Clifford, please take a few minutes to check it out.