`dbt run` fails when the `location_root` is updated
Describe the bug
dbt run fails for models materialized as tables when the location_root is updated.
Steps To Reproduce
- Define
model_aas materialized as a table - Define
location_rootfor model (i.es3://my-bucket/location1) - Run model
- Update model's
location_rootto a different path (i.es3://my-bucket/location2) - Run model
Error is thrown
The location of the existing table
hive_metastore.db.model_aiss3://my-bucket/location1/modela. It doesn't match the specified locations3://my-bucket/location2/modela.
Expected behavior
The storage location is updated without an error. This is in-fact the behaviour when the model is defined with an incremental materialization and run with the full-refresh flag.
The incremental materialization is working because a drop table if exists command runs before the create or replace table as, which is not the case for the table materialization
System information
Core:
- installed: 1.1.1
- latest: 1.1.1 - Up to date!
Plugins:
- databricks: 1.1.0 - Update available!
- spark: 1.1.0 - Up to date!
The operating system you're using: macOS Monterrey - 12.4
The output of python --version: Python 3.9.12