Hello,
I want to output data every minute and if the value is empty I want to fill it with the previous value.
So I queried the data using flux code as below.
from(bucket: "sample")
|> range(start: 2023-04-19T00:00:00Z, stop: 2023-04-20T00:00:00Z)
|> filter(fn: (r) => r["_measurement"] == "data" and r["_field"] == "value")
|> aggregateWindow(every: 1m, fn: last)
|> fill(column: "_value", usePrevious: true)
According to the code, the value of each minute is output, and at the end the following data is output.
table _start* _stop* _time _value _field* _measurement*
0 2023-04-19T00:00:00Z 2023-04-20T00:00:00Z 2023-04-20T00:00:00Z 0 value data
I think this is unnecessary data, but I would like to know why this data is output and how to remove it.
Please give me some advice.
Thanks.