dbt-databricks
dbt-databricks copied to clipboard
Wrong command for dropping Materialized Views
Describe the bug
When switching from materialized='materialized_view'
to materialized='materialized_view'
an incorrect statement is issued
11:40:17 Dropping relation `some`.`dbt_eongaro`.`test` because it is of type materializedview
11:40:17 On model.umc_poc.test: drop materializedview if exists `some`.`dbt_eongaro`.`test`
11:40:17 Databricks adapter: Error while running:
drop materializedview if exists `some`.`dbt_eongaro`.`test`
Steps To Reproduce
- Create a new model with `materialized='materialized_view'
- dbt run
- change model to `materialized='view'
- dbt run
- See error
drop materializedview if exists `some`.`dbt_eongaro`.`test
Expected behavior
A clear and concise description of what you expected to happen.
System information
12:02:24 Running with dbt=1.7.7
12:02:24 Registered adapter: databricks=1.7.3
Hmm, wonder why this wasn't reported sooner. This will be fixed soon when we upgrade materialized view behavior (hopefully next version if I've correctly fixed the too many 503 issues). I should have a beta out with this behavior this week or early next.
Sorry for the delay, the beta with the fix is out today (1.8.0b1).
https://github.com/databricks/dbt-databricks/discussions/595