Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update v3_timeseries.pipe

Steven Teycedaf5bcc6a7
diff --git a/packages/tinybird/pipes/v3_timeseries.pipe b/packages/tinybird/pipes/v3_timeseries.pipe
index b1050bc00e..faed17ab6e 100644
--- a/packages/tinybird/pipes/v3_timeseries.pipe
+++ b/packages/tinybird/pipes/v3_timeseries.pipe
@@ -42,16 +42,15 @@ SQL >
toDateTime64({{ DateTime64(end, '2024-05-23 00:00:00.000') }}, 3),
{{ String(timezone, 'UTC') }}
) AS
- end
+ end,
+ dateDiff('day', start, end) + 1 AS days_diff
SELECT
arrayJoin(
arrayMap(
- x -> toDateTime64(toStartOfDay(toDateTime64(x, 3), {{ String(timezone, 'UTC') }}), 3),
- range(toUInt32(start), toUInt32(end + 86400),
- 86400
+ x -> toDateTime64(start + toIntervalDay(x), 3, {{ String(timezone, 'UTC') }}),
+ range(0, days_diff)
)
- )
- ) as interval
+ ) as interval