Skip to content

Commit

Permalink
Move _build_run_microbatch_model_result to MicrobatchModelRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Nov 21, 2024
1 parent 7b3e54a commit 3981e7b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions core/dbt/task/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,6 @@ def _build_run_model_result(self, model, context, elapsed_time: float = 0.0):
batch_results=None,
)

def _build_run_microbatch_model_result(self, model: ModelNode) -> RunResult:
return RunResult(
node=model,
status=RunStatus.Success,
timing=[],
thread_id=threading.current_thread().name,
# The execution_time here doesn't get propagated to logs because
# `safe_run_hooks` handles the elapsed time at the node level
execution_time=0,
message="",
adapter_response={},
failures=0,
batch_results=BatchResults(),
)

def _materialization_relations(self, result: Any, model) -> List[BaseRelation]:
if isinstance(result, str):
msg = (
Expand Down Expand Up @@ -489,6 +474,21 @@ def _build_failed_run_batch_result(
batch_results=BatchResults(failed=[batch]),
)

def _build_run_microbatch_model_result(self, model: ModelNode) -> RunResult:
return RunResult(
node=model,
status=RunStatus.Success,
timing=[],
thread_id=threading.current_thread().name,
# The execution_time here doesn't get propagated to logs because
# `safe_run_hooks` handles the elapsed time at the node level
execution_time=0,
message="",
adapter_response={},
failures=0,
batch_results=BatchResults(),
)

def _execute_microbatch_materialization(
self,
model: ModelNode,
Expand Down

0 comments on commit 3981e7b

Please sign in to comment.