-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time_bucket() origin argument on time_bucket_gapfill() #1545
Comments
Can the start/end optional parameters help here? (https://docs.timescale.com/latest/api#time_bucket_gapfill-optional-arguments) You can set them to the start of your 8 hour workshift |
It seems that start parameter has different semantic.
But the first bucket starts from 2019-11-25 01:00:00 I need to start from 2019-11-25 06:00:00 |
To have the same effect as select COALESCE(t1.t, t2.t) AS t from(
select time_bucket('8 hours' , telemetry.time , '2019-11-25 06:00', '2019-11-26 14:00') as t, count(*) from telemetry group by t) t1
right join (select t as t from generate_series('2019-11-25 06:00', '2019-11-26 14:00', interval '8 hours') t) t2
on t1.t = t2.t Not actually tried the query, but hopefully you get the idea :) The idea is to generate another table in our time range and join it with the bucket table. |
Thank you @rubengees |
Duplicate of #1304 |
Hi,
I would need an optional argument like time_bucket() origin, on time_bucket_gapfill().
Is there a way to gain the same effect?
In my use case, I need to split the data in bucket of eight hours starting from a specific timestamp (i.e. the start time of a workshift).
It would be nice to have origin also on time_bucket_gapfill().
Thanks
Alberto
The text was updated successfully, but these errors were encountered: