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.
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"
running 'dbt run' again might work without issue, depending on the models processing order.
dbt v0.12.2
@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
Fixed in #1342
@beckjake I thought I had broken this in https://github.com/fishtown-analytics/dbt/pull/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
Most helpful comment
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