-
Notifications
You must be signed in to change notification settings - Fork 135
Issues with replace flow causing cyclical errors #997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Something has really gone wrong here if 'CREATE SCHEMA IF NOT EXISTS |
This is the line that looks wrong:
This is trying to create a real view but using the tmp name. |
That makes sense. Is this then an issue with the materialization V2 logic? |
Yes, I have been able to repro. I don't know why the temp view name is being used as though its the target, that's what we need to figure out. |
Describe the bug
When attempting to rerun models which materialize as flows using materialization V2, numerous bugs are thrown. When creating the required intermediate views, the
create or replace
query uses just the identifier without the catalog or schema. This causes the view to be created in thehive_metastore
. If the view relies on any resources in the Unity Catalog, this will throw an error like below.Similarly, if the view is configured to use a unique name for the temporary intermediate view, the name of the intermediate view created will not match the name of the view in the later
rename
query on 'safely replace` flows causing an error like below.During each of these operations, the original view will be dropped meaning the subsequent view will be created as expected. However, the following run will throw one of the above errors again leading to cyclical errors.
Steps To Reproduce
unique_tmp_table_suffix
enabled without any reference to other resources in the Unity Catalog.Expected behavior
The view is recreated according to the logic of the expected replace flow.
Screenshots and log output
Logs when attempting to create the intermediate view in
hive_metastore
:Logs when attempting to rename the intermediate view with a unique identifier:
System information
The output of
dbt --version
:Using the latest commit of
dbt-databricks
frommain
branch.The operating system you're using:
MacOS 15.3.2
The output of
python --version
:Python 3.12.9
The text was updated successfully, but these errors were encountered: