influxdb-client-csharp icon indicating copy to clipboard operation
influxdb-client-csharp copied to clipboard

Extend "AggregateWindow" function for "offset"

Open hexxone opened this issue 2 years ago • 0 comments

Proposal: The InfluxDb Docs talk about a offset parameter being available in the "aggregateWindow" function. Right here:

https://docs.influxdata.com/flux/v0.x/stdlib/universe/aggregatewindow/#downsample-by-calendar-week-starting-on-monday

Which I would like to use for proper week aggregation, but it seems currently not possible? Sorry if I have missed something.

Current behavior: When querying Data for "This week" or 1w on every , it always starts from Thursdays.

Desired behavior: It should be possible to pass any (TimeSpan?) offsets into the aggregateWindow function.

Alternatives considered: I considered writing this part of the Query by hand, but since I was verry happy with InfluxDB.Client.Linq until now, I would only take it as a last resort.

Use case: If you want to have a stats Display (say for your solar roof setup at home), showing the data from 1 year in weeks, it does not make much sense for the week to "start" on a thursday.

hexxone avatar Feb 23 '23 15:02 hexxone