I’m using InfluxDB to store sensor data (each sensor measuring every 30 seconds or so, a few thousand sensors). I often want to plot data for longer timeframes, so I want to use continuous queries to downsample the data. Currently my plan is to store
count for each sensor at resolutions of 1 hour, 1 day, and 1 week.
Because a day is 24 hours and a week is 7 days, I’d like to do the week aggregation by querying from the day measurement, and the day from the hours, that way I don’t have to query a week’s worth of raw data.
The issue is that if the week CQ runs before the day CQ, it will be missing the last day’s data. So I’d either need to specify the order I want the CQs to run in, or somehow express a dependency between them that could be used to set their ordering. Is there any way to do this in Influx, or some better approach to downsampling to multiple resolutions?