flux icon indicating copy to clipboard operation
flux copied to clipboard

Update window implementation for new intervals spec

Open nathanielc opened this issue 7 years ago • 2 comments

See https://github.com/influxdata/platform/blob/master/query/docs/SPEC.md#window

nathanielc avatar Aug 17 '18 20:08 nathanielc

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]),
)

image

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

image

Regards

jben94 avatar May 10 '19 10:05 jben94

@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.

nathanielc avatar May 15 '19 22:05 nathanielc