Hi all,
While working on our dbt project, we encountered an issue related to model naming conflicts.
We have two models named v_booking_line_f
, each located in a different schema (e.g., schema_a.v_booking_line_f
and schema_b.v_booking_line_f
). However, dbt enforces uniqueness on model names across the entire project, regardless of the schema they’re materialized into. Because of this, dbt throws a conflict and prevents us from executing the project unless we rename one of the models.
To proceed with development and testing in our dev environment, we temporarily renamed one of the models. However, this is not a scalable or maintainable solution, especially when multiple teams are contributing models that may share common names but differ in schema and logic.
Question:
What is the recommended way to handle such cases in dbt where models with the same name are required in different schemas?
We would appreciate any guidance or best practices for avoiding conflicts while preserving schema-level separation of logic.
Thanks!