-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation on incremental strategies does not allow for custom strategies #783
Comments
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. |
Same issue: 753 |
Has there been any discussion had/movement on this? |
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. |
Same thing happens with BigQuery adapter:
|
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: