Skip to content

Commit

Permalink
Add docstring to get_incremental_strategy_macro
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Nov 7, 2024
1 parent 2b42247 commit 89ca753
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,17 @@ def builtin_incremental_strategies(self):

@available.parse_none
def get_incremental_strategy_macro(self, model_context, strategy: str):
"""Gets the macro for the given incremental strategy.
Additionally some validations are done:
1. Assert that if the given strategy is a "builtin" strategy, then it must
also be defined as a "valid" strategy for the associated adapter
2. Assert that the incremental strategy exists in the model context
Notably, something be defined by the adapter as "valid" without it being
a "builtin", and nothing will break (and that is desirable).
"""

# Construct macro_name from strategy name
if strategy is None:
strategy = "default"
Expand Down

0 comments on commit 89ca753

Please sign in to comment.