flux
flux copied to clipboard
Add every parameter for window to aggregateWindow
aggregateWindow doesn't support every parameter in window.
For example, one cannot specify offset.
Make it so.
Can anyone help me understand how I am meant to use offset when aggregateWindow is being used?
I can't for life of me figure it out, and it's meant I can't migrate a query I've used in InfluxQL to Flux.
@mabnz I think you are targeting the right issue.
aggregateWindow does not expose every window argument.
This needs to be done.
FYI @nathanielc
So far, offset is still not added to aggregateWindow. So I have to use window instead of aggregateWindow when I need offset, but window is slower. Another question is why is window so much slower than aggregateWindow when they are doing the same task.
Same here. We wanted to migrate our InfluxDB 1.7.10 instance in production to 2.0 however because of not being able to use offset in aggregateWindow i can't, would be a really good feature
Offset has been added in https://github.com/influxdata/flux/pull/3580
This would also be useful in timedMovingAverage() and probably others. Use case is time aligning the source samples for thresholding via a join.
Without an offset parameter for the moving average, additional work is required to align them, e.g using truncateTimeColumn() and this isn't always appropriate.
Also as a comment, I do think it's worth looking at the origin parameter of the timescale time_bucket function, which permits the reference epoch for windowing functions to be specified explicitly or derived from the data being windowed. This offers greater flexibility.
This issue has had no recent activity and will be closed soon.