Skip to content

Commit

Permalink
Fix microbatch behavior flag check (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm authored Nov 13, 2024
1 parent 85122e5 commit f70bae8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20241112-141109.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Negate the check for microbatch behavior flag in determining builtins
time: 2024-11-12T14:11:09.341634-06:00
custom:
Author: QMalcolm
Issue: 349
8 changes: 7 additions & 1 deletion dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1580,8 +1580,14 @@ def valid_incremental_strategies(self):
return ["append"]

def builtin_incremental_strategies(self):
"""
List of possible builtin strategies for adapters
Microbatch is added by _default_. It is only not added when the behavior flag
`require_batched_execution_for_custom_microbatch_strategy` is True.
"""
builtin_strategies = ["append", "delete+insert", "merge", "insert_overwrite"]
if self.behavior.require_batched_execution_for_custom_microbatch_strategy.no_warn:
if not self.behavior.require_batched_execution_for_custom_microbatch_strategy.no_warn:
builtin_strategies.append("microbatch")

return builtin_strategies
Expand Down

0 comments on commit f70bae8

Please sign in to comment.