Giuseppe Palmieri
Giuseppe Palmieri

Reputation: 39

Issues while interpolating using time_bucket_gapfill with data within that bucket

I'm having the same issue here as already asked before in this post: time_bucket_gapfill and interpolate

When using time bucket with readings the interpolation only calculate the correct value on "missing rows" and if any measure exists in that bucket it is taken as it is without any interpolation.

In my case i was using a month as a bucket and if a measure exists within that month the result is that exact same value. This lead me to error when calculating the actual consumption when subtratcting the readings. The only way i found to mitigate this is to reduce the bucket for gapfill to at least 1 day in a CTE and then use a second query to pick up the monthly bucket with correctly interpolated values. I would use this approach but with lots of data it takes minutes to compute the query.

Any idea to attempt to adddress this?

Upvotes: 0

Views: 41

Answers (0)

Related Questions