project Utilities / Python Influxdb Downsample avatar

utilities/python_influxdb_downsample#5: Add support for window

Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: vnext
Created: 04-Feb-23 20:47


The downsampler currently accepts a query period and then runs aggregates over that time-range.

However, a lot of my Flux scripts query a long period and then window it - the idea being that if a run fails, the next will catch things up.

It'd be good to support the same - specifying a window period in YAML

Toggle State Changes


assigned to @btasker

One of the challenges with this will be calculating the timestamp to use with each window.

Currently we figure it out from the task start time and the query period, that won't work with a window

So actually, adding this will remove the need to calculate the timestamp - _start and _stop get aligned to the window.


mentioned in commit d79295eea23c4b31a59527257fe393895f906cce

Commit: d79295eea23c4b31a59527257fe393895f906cce 
Author: B Tasker                            
Date: 2023-02-05T10:01:58.000+00:00 


Don't custom calculate time windows, have Flux do it for us utilities/python_influxdb_downsample#5

This switches to using window() to calculate windows, allowing much longer time periods to be queried and broken up into smaller windows

+2 -4 (6 lines changed)

mentioned in commit cca6226f8982c26c0d81100cf576c776bc3bc5ec

Commit: cca6226f8982c26c0d81100cf576c776bc3bc5ec 
Author: B Tasker                            
Date: 2023-02-05T09:57:03.000+00:00 


Add support for window() utilities/python_influxdb_downsample#5

If window isn't included in the YAML, it'll default to be the same as period

+11 -0 (11 lines changed)

mentioned in commit c19e4bf5914388b3f25776353346e274cb45305d

Commit: c19e4bf5914388b3f25776353346e274cb45305d 
Author: B Tasker                            
Date: 2023-02-05T10:04:43.000+00:00 

Message +8 -2 (10 lines changed)