Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sqlmesh/dbt/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ def to_sqlmesh(
# Set allow_partials to True for dbt models to preserve the original semantics.
allow_partials = True

# pop begin for all models so we don't pass it through for non-incremental materializations
# (happens if model config is microbatch but project config overrides)
begin = model_kwargs.pop("begin", None)
if kind.is_incremental:
if self.batch_size and isinstance(self.batch_size, str):
if "interval_unit" in model_kwargs:
Expand All @@ -665,7 +668,7 @@ def to_sqlmesh(
else:
model_kwargs["interval_unit"] = self.batch_size
self.batch_size = None
if begin := model_kwargs.pop("begin", None):
if begin:
if "start" in model_kwargs:
get_console().log_warning(
f"Both 'begin' and 'start' are set for model '{self.canonical_name(context)}'. 'start' will be used."
Expand Down