-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
_tmp relation name should be based on model name, not on alias (or be schema prefixed) #1321
Comments
@fetanchaud thanks for the report! Did you see this on postgres/redshift? Using the model name instead of the alias is a good idea :) |
my fault, did not mention we are working on postgres ! DBT is an incredible tool, thank you for providing us with such a powerful ELT engine ! regards from France |
…rom-modelname Prefix temp relations with model name instead of alias (#1321)
Fixed in #1342 |
@beckjake I thought I had broken this in #1478 but it turns out that we added a timestamp to the end of the temp relation name to fix other unrelated issues with temp tables on postgres/redshift. So, all good here i think |
Issue
in multi-threaded mode, 'dbt run' fails when two models share the same alias on distinct schemas, because the temporary tables share the same name for both models.
Issue description
model1.sql : schema = schema1, alias = my_model
model2.sql : schema = schema2, alias = my_model
in profile.yml : threads >= 2
dbt run might fail with the following error :
"ERROR : my_model__dbt_incremental_tmp already exists"
Results
running 'dbt run' again might work without issue, depending on the models processing order.
System information
dbt v0.12.2
The text was updated successfully, but these errors were encountered: