flux
flux copied to clipboard
Update window implementation for new intervals spec
See https://github.com/influxdata/platform/blob/master/query/docs/SPEC.md#window
Hi,
I would like to make a request just by taking the hours of work. I noticed that the 'intervals' function should do the job but I can not use it. Is this function implemented?
https://docs.influxdata.com/flux/v0.24/functions/built-in/misc/intervals/
// Work hours from 9AM - 5PM on work days.
intervals(
every:1d,
period:8h,
offset:9h,
filter:(interval) => !(weekday(time: interval.start) in [Sunday, Saturday]),
)

Test with Basic Intervals : window(intervals: intervals(every:1h))

Regards
@jben94 Glad to see that the intervals function would be useful for you. It is not currently implemented. You can follow this issue https://github.com/influxdata/flux/issues/407 for our progress.