From 594788d140d26b5efe2d1ca4c0d46b48e5f7c7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Mon, 22 Apr 2024 15:40:23 +0200 Subject: [PATCH] chore: Bump timestamp bounds in batch exports (#21717) --- posthog/temporal/batch_exports/batch_exports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posthog/temporal/batch_exports/batch_exports.py b/posthog/temporal/batch_exports/batch_exports.py index 4e4b3ac11a445..66279ccd7183e 100644 --- a/posthog/temporal/batch_exports/batch_exports.py +++ b/posthog/temporal/batch_exports/batch_exports.py @@ -51,7 +51,7 @@ -- These 'timestamp' checks are a heuristic to exploit the sort key. -- Ideally, we need a schema that serves our needs, i.e. with a sort key on the _timestamp field used for batch exports. -- As a side-effect, this heuristic will discard historical loads older than a day. -AND timestamp >= toDateTime64({data_interval_start}, 6, 'UTC') - INTERVAL 2 DAY +AND timestamp >= toDateTime64({data_interval_start}, 6, 'UTC') - INTERVAL 4 DAY AND timestamp < toDateTime64({data_interval_end}, 6, 'UTC') + INTERVAL 1 DAY """