Skip to content

Commit

Permalink
Update MicrobatchBuilder.build_end_time to use ceiling_timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Oct 18, 2024
1 parent bad3e0b commit 3e2b3e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/dbt/materializations/incremental/microbatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 44 in core/dbt/materializations/incremental/microbatch.py

View check run for this annotation

Codecov / codecov/patch

core/dbt/materializations/incremental/microbatch.py#L43-L44

Added lines #L43 - L44 were not covered by tests

def build_start_time(self, checkpoint: Optional[datetime]):
"""Create a start time based off the passed in checkpoint.
Expand Down

0 comments on commit 3e2b3e2

Please sign in to comment.