You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The databricks adapter, however, overrides this functionality. A validation function is used which hardcodes only the builtin incremental strategies, constraining the user unnecessarily. The validation function is here:
I'm fairly sure we imported/inherited this behavior from dbt-spark. At this point I have no idea why the limitation exists, so I will discuss with my team about lifting it.
I'm in favor of removing the limitation, but haven't had time to comb the code to understand impact. There may be a couple of places where we assume a fixed set of strategies and make some assertions based on that.
Describe the bug
Custom strategies are supported in dbt-core and allow users to write macros that define incremental merge startegies ( https://docs.getdbt.com/docs/build/incremental-strategy#custom-strategies ). As long as the strategy macro is found in the namespace, it can be used.
The databricks adapter, however, overrides this functionality. A validation function is used which hardcodes only the builtin incremental strategies, constraining the user unnecessarily. The validation function is here:
dbt-databricks/dbt/include/databricks/macros/materializations/incremental/validate.sql
Line 38 in 6b29d32
Personally I have overridden this validation function to include my custom merge strategies, but obviously this isn't ideal.
Steps To Reproduce
Implement custom merge strategy following dbt documentation
Expected behavior
Custom merge strategy should be usable provided they are in the namespace
The text was updated successfully, but these errors were encountered: