You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
I have two projects:
project source_ax12 which has a model TaxTrans.
project databricks_dwh which imports project source_ax12 as package and has a model TaxTrans itself.
When I parse the project, I get the error that the model TaxTrans exist twice.
Only option I can work around myself is renaming TaxTrans in the databricks_dwh project to something else and use a alias. But this is not something I want to do. Sub projects should not mess up my main project model naming(!) And to adjust the sub project doesn't make much sence to me. Then I mess up the model naming there. I want to have consistent, clear naming in the projects themselve.
Expected Behavior
I would expect that the parsing works out and that dbt by default let the TaxTrans model in the databricks_dwh win. It should only redirect to the TaxTrans of the source_ax12 project when I reference to it explicitly.
Steps To Reproduce
create a project like described above
run dbt parse
Relevant log output
dbt.log
�[0m08:26:10.446302 [info ] [MainThread]: Manifest loaded
�[0m08:26:10.458008 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7fe7b80dca90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7fe7b80dc490>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7fe7b80dc3a0>]}
�[0m08:26:10.458492 [debug] [MainThread]: Flushing usage events
�[0m08:26:11.061893 [error] [MainThread]: Encountered an error:
Compilation Error
dbt found two models with the name "TaxTrans".
Since these resources have the same name, dbt will be unable to find the correct resource
when looking for ref("TaxTrans").
To fix this, change the name of one of these resources:
- model.databricks_dwh.TaxTrans (models/Finance/TaxTrans.sql)
- model.source_ax12.TaxTrans (models/source_ax12/TaxTrans.sql)
Environment
- OS: Debian 11
- Python: 3.9.2
- dbt: 1.4.1
Which database adapter are you using with dbt?
spark
Additional Context
No response
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[Bug] duplicate model conflict with sub projects
[CT-2077] [Bug] duplicate model conflict with sub projects
Feb 10, 2023
Is this a new bug in dbt-core?
Current Behavior
I have two projects:
source_ax12
which has a modelTaxTrans
.databricks_dwh
which imports projectsource_ax12
as package and has a modelTaxTrans
itself.When I parse the project, I get the error that the model
TaxTrans
exist twice.Only option I can work around myself is renaming
TaxTrans
in thedatabricks_dwh
project to something else and use a alias. But this is not something I want to do. Sub projects should not mess up my main project model naming(!) And to adjust the sub project doesn't make much sence to me. Then I mess up the model naming there. I want to have consistent, clear naming in the projects themselve.Expected Behavior
I would expect that the parsing works out and that dbt by default let the
TaxTrans
model in thedatabricks_dwh
win. It should only redirect to theTaxTrans
of thesource_ax12
project when I reference to it explicitly.Steps To Reproduce
dbt parse
Relevant log output
dbt.log
Environment
Which database adapter are you using with dbt?
spark
Additional Context
No response
The text was updated successfully, but these errors were encountered: