databricks / dbt-databricks

A dbt adapter for Databricks.
https://databricks.com
Apache License 2.0
225 stars 119 forks source link

Wrong command for dropping Materialized Views #579

Closed ernestoongaro closed 1 month ago

ernestoongaro commented 9 months ago

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

  1. Create a new model with `materialized='materialized_view'
  2. dbt run
  3. change model to `materialized='view'
  4. dbt run
  5. 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
benc-db commented 9 months ago

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.

benc-db commented 8 months ago

Sorry for the delay, the beta with the fix is out today (1.8.0b1).

benc-db commented 8 months ago

https://github.com/databricks/dbt-databricks/discussions/595

github-actions[bot] commented 2 months ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.