I’m trying to compute summary data over series data that may have gaps. I would like to fill with the previous value in case of gaps, but would settle for being able to fill with zeros. My tickscript looks like this:
var SQL = '''SELECT "duration" FROM "desktop_client"."default"."profiling_metrics"'''' var hour_batched = batch |query(SQL) .period(1h) .every(1h) .groupBy(*) .align() .fill('previous') var hour_median = hour_batched |median('duration') .as('hour_median') |influxDBOut() .database('desktop_client') .measurement('kapacitor_experimental')
Any value I use for .fill() (previous, 0, null, etc.) yields the same results, and hours with missing values in the original series are also missing data in the transformed series. I have tried putting ‘GROUP BY/FILL’ in the influx query as well, with no results.
What am I doing wrong?