Skip to content

Commit

Permalink
rename configs to __dbt_internal
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Sep 14, 2024
1 parent dc7d4b7 commit a31e703
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ def resolve_event_time_filter(self, target: ManifestNode) -> Optional[EventTimeF
and self.model.config.materialized == "incremental"
and self.model.config.incremental_strategy == "microbatch"
):
start = self.model.config.get("event_time_start")
end = self.model.config.get("event_time_end")
start = self.model.config.get("__dbt_internal_microbatch_event_time_start")
end = self.model.config.get("__dbt_internal_microbatch_event_time_end")

if start is not None or end is not None:
event_time_filter = EventTimeFilter(
Expand Down
6 changes: 2 additions & 4 deletions core/dbt/task/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,8 @@ def _execute_microbatch_materialization(self, model, manifest, context, material
# iterate over each batch, calling materialization_macro to get a batch-level run result
for batch_idx, batch in enumerate(batches):
batch_description = self.describe_batch(batch[0], batch[1])
# TODO: consider setting timestamps on 'ref' and passing to extra_context
# or at least naming configs with more unique names + popping after execution (e.g. _dbt_microbatch_event_time_start)
model.config["event_time_start"] = batch[0]
model.config["event_time_end"] = batch[1]
model.config["__dbt_internal_microbatch_event_time_start"] = batch[0]
model.config["__dbt_internal_microbatch_event_time_end"] = batch[1]

self.print_batch_start_line(batch_description, batch_idx + 1, len(batches))

Expand Down

0 comments on commit a31e703

Please sign in to comment.