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
I would like an option to specify in the .yaml file if the primary key uses the rely option. Possible name for this could be rely or constraint_option. Rely would significantly speed up queries.
Describe alternatives you've considered
Manually changing the primary keys for tables gets overwritten by full-refresh deployments
@mmansikka this is in the works and coming in dbt-databricks 1.10. Rather than enforce specific options via config, plan is to use the expression field to allow any additional config to PK/FK.
Describe the feature
I would like an option to specify in the .yaml file if the primary key uses the rely option. Possible name for this could be rely or constraint_option. Rely would significantly speed up queries.
Describe alternatives you've considered
Manually changing the primary keys for tables gets overwritten by full-refresh deployments
Additional context
Docs for rely https://learn.microsoft.com/en-us/azure/databricks/sql/language-manual/sql-ref-syntax-ddl-create-table-constraint
Speeding up queries with rely https://learn.microsoft.com/en-us/azure/databricks/sql/user/queries/query-optimization-constraints
On databricks this blog post https://www.databricks.com/blog/primary-key-and-foreign-key-constraints-are-ga-and-now-enable-faster-queries
The change would be before this part of the code defining the alter table statement for primary key constraint
dbt-databricks/dbt/include/databricks/macros/relations/constraints.sql
Line 173 in b0ff51b
Who will this benefit?
This will speed up user queries and make sure what is defined in dbt project is in line with UC table constraints.
Are you interested in contributing this feature?
I can write some code but new to developing this adapter
The text was updated successfully, but these errors were encountered: