Skip to content

Commit

Permalink
remove manifest parameter from ModelRunner._execute_model
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Nov 27, 2024
1 parent 57acd23 commit af79cfc
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions core/dbt/task/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ def _execute_model(
hook_ctx: Any,
context_config: Any,
model: ModelNode,
manifest: Manifest,
context: Dict[str, Any],
materialization_macro: MacroProtocol,
) -> RunResult:
Expand Down Expand Up @@ -328,9 +327,7 @@ def execute(self, model, manifest):

hook_ctx = self.adapter.pre_model_hook(context_config)

return self._execute_model(
hook_ctx, context_config, model, manifest, context, materialization_macro
)
return self._execute_model(hook_ctx, context_config, model, context, materialization_macro)


class MicrobatchModelRunner(ModelRunner):
Expand Down Expand Up @@ -522,7 +519,6 @@ def _build_run_microbatch_model_result(self, model: ModelNode) -> RunResult:
def _execute_microbatch_materialization(
self,
model: ModelNode,
manifest: Manifest,
context: Dict[str, Any],
materialization_macro: MacroProtocol,
) -> RunResult:
Expand Down Expand Up @@ -644,37 +640,23 @@ def _is_incremental(self, model) -> bool:
else:
return False

def _execute_microbatch_model(
def _execute_model(
self,
hook_ctx: Any,
context_config: Any,
model: ModelNode,
manifest: Manifest,
context: Dict[str, Any],
materialization_macro: MacroProtocol,
) -> RunResult:
try:
batch_result = self._execute_microbatch_materialization(
model, manifest, context, materialization_macro
model, context, materialization_macro
)
finally:
self.adapter.post_model_hook(context_config, hook_ctx)

return batch_result

def _execute_model(
self,
hook_ctx: Any,
context_config: Any,
model: ModelNode,
manifest: Manifest,
context: Dict[str, Any],
materialization_macro: MacroProtocol,
) -> RunResult:
return self._execute_microbatch_model(
hook_ctx, context_config, model, manifest, context, materialization_macro
)


class RunTask(CompileTask):
def __init__(
Expand Down

0 comments on commit af79cfc

Please sign in to comment.