Hello, I need to downsample (i’d rather say decimate) and take the value of the measurement at the minute roll-over (green arrows)
I used |> aggregateWindow(every: 1m, fn: first, createEmpty: true, timeSrc: "_start")
but I get the values corresponding to the red arrows.
This is because the first() gets the first non null value in the 1 minute window. Basically, the first() function is too smart for what I want to do.
I tried to create 2 different implementations of a dumbfirst()
|> aggregateWindow(every: 1m, fn: (column, tables=<-) => tables |> limit(n: 1), createEmpty: true, timeSrc: "_start")
|> aggregateWindow(every: 1m, fn: (column, tables=<-) => tables |> bottom(n: 1, columns: ["_time"]), createEmpty: true, timeSrc: "_start")
but they both give the same result as the first()
Any idea to achieve this simple decimation/downsampling? Thanks!