From 3e2b3e2db4b2a7cb933bac5edf6739e47effaaf7 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Fri, 18 Oct 2024 11:12:51 -0700 Subject: [PATCH] Update `MicrobatchBuilder.build_end_time` to use `ceiling_timestamp` --- core/dbt/materializations/incremental/microbatch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbt/materializations/incremental/microbatch.py b/core/dbt/materializations/incremental/microbatch.py index 6a204458c49..b7fd7ac08eb 100644 --- a/core/dbt/materializations/incremental/microbatch.py +++ b/core/dbt/materializations/incremental/microbatch.py @@ -40,7 +40,8 @@ def __init__( def build_end_time(self): """Defaults the end_time to the current time in UTC unless a non `None` event_time_end was provided""" - return self.event_time_end or self.default_end_time + end_time = self.event_time_end or self.default_end_time + return MicrobatchBuilder.ceiling_timestamp(end_time, self.model.config.batch_size) def build_start_time(self, checkpoint: Optional[datetime]): """Create a start time based off the passed in checkpoint.