From 3981e7bd092d9ad15f720ab1461758a7e6197d39 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Wed, 20 Nov 2024 21:17:05 -0600 Subject: [PATCH] Move `_build_run_microbatch_model_result` to `MicrobatchModelRunner` --- core/dbt/task/run.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/core/dbt/task/run.py b/core/dbt/task/run.py index 56e33685165..1b4be463e78 100644 --- a/core/dbt/task/run.py +++ b/core/dbt/task/run.py @@ -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 = ( @@ -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,