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 docs says: "As Databricks does not support transactions nor allows using create or replace table with a column schema, the table is first created without a schema, and alter statements are then executed to add the different constraints."
Implementing this approach would allow dbt to enforce constraints in Databricks by ensuring 'bad' data never gets inserted into the tables in the first place, which isn't exactly possible now.
hey @togobingi , thanks so much for opening this issue up! can you say more about how you came to this conclusion? I've just checked internally with the team and it looks like dbt-databricks doesn't currently support create/replace table with constraints, but it's on the backlog as a high priority.
if you can clarify, i can work with the team to understand this more. many thanks!
Link to the page(s) on docs.getdbt.com requiring updates
https://docs.getdbt.com/reference/resource-properties/constraints#platform-specific-support
Tell us more about this update
The docs says: "As Databricks does not support transactions nor allows using
create or replace table
with a column schema, the table is first created without a schema, andalter
statements are then executed to add the different constraints."However, you can create and replace tables with a column schema as shown in the Databricks docs: https://docs.databricks.com/en/tables/constraints.html#set-a-not-null-constraint-in-databricks
Implementing this approach would allow dbt to enforce constraints in Databricks by ensuring 'bad' data never gets inserted into the tables in the first place, which isn't exactly possible now.
Reviewers/Stakeholders/SMEs
@mirnawong1
Related GitHub issues
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: