I want to group data by time using the stream setup.
(The batch and query nodes are not acceptable unless there is a way to wildcard the measurement. - If there is, I would like to know)
The data that is fed via telegraf consists of A 30 second burst every 15 minutes (beginning by the 15 minute mark).
My goal is aggregation of those INCOMPLETE 15 minute windows.
The Influx query over the entire time series works as expected:
select spread(x),spread(y),min(x), min(y),… from (m) group by time(15m)
Re-implementing it using streams fails
//Some UDF Processing per Point FOR ALL measurements: Works var data = stream |from() .database('db') .retentionPolicy('autogen') .groupBy('tag') @udf() |eval(lambda: string("tag")) .as('tag') .tags('tag') .keep('x', 'y','z', 'w') //Writing in other database with same measurement: Works as well data |influxDBOut() .database('dbOut') .precision('ms')
I am currently trying and failing to produce groups:
// This fails/ does not produce any group //Reducing the every duration to less that 30s appears to trigger some groups var groupWindow = data |groupBy() |window() .period(15m) .every(15m) |log() //This seems to be causing an error. Should that work? var groupGroupBy = data |groupBy(time(15m)) |log()
How should I go about grouping by 15 minutes?