Skip to content

Commit

Permalink
Fix setting of global behavior flags
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Nov 12, 2024
1 parent dc9ac2a commit 69278ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20241112-143740.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Move require_batched_execution_for_custom_microbatch_strategy flag to gloabl
time: 2024-11-12T14:37:40.681284-06:00
custom:
Author: QMalcolm
Issue: N/A
9 changes: 8 additions & 1 deletion dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ class BaseAdapter(metaclass=AdapterMeta):
}

MAX_SCHEMA_METADATA_RELATIONS = 100
GLOBAL_BEHAVIOR_FLAGS = [
{
"name": "require_batched_execution_for_custom_microbatch_strategy",
"default": False,
"docs_url": "https://docs.getdbt.com/docs/build/incremental-microbatch",
}
]

# This static member variable can be overridden in concrete adapter
# implementations to indicate adapter support for optional capabilities.
Expand All @@ -274,7 +281,7 @@ def __init__(self, config, mp_context: SpawnContext) -> None:
self._macro_resolver: Optional[MacroResolverProtocol] = None
self._macro_context_generator: Optional[MacroContextGeneratorCallable] = None
# this will be updated to include global behavior flags once they exist
self.behavior = [] # type: ignore
self.behavior = self.GLOBAL_BEHAVIOR_FLAGS # type: ignore

###
# Methods to set / access a macro resolver
Expand Down

0 comments on commit 69278ac

Please sign in to comment.