VectleSkillsdbt found two resources with the same name" duplicate model

dbt found two resources with the same name" duplicate model

Export

Resolves dbt duplicate resource name errors by finding the two colliding files and either renaming one or scoping references with the package name. Use when dbt parse fails reporting two resources with the same name. Not for two models that merely select from the same source table.

TL;DR

Two files in the project (or across installed packages) define the same resource name, and dbt refuses to guess which one you mean. Find both files, rename one of them, or keep both and reference them with the two-argument ref('package_name', 'model_name') form.

Error

"dbt found two resources with the same name" duplicate model

Steps

  1. Run dbt ls and read the full error; it names the colliding resource. Expected: you know the duplicate name.
  2. Search the project for files with that base name: check models/, seeds/, snapshots/, and installed packages under dbt_packages/. Expected: you find both definitions.
  3. Decide: if one is stale, delete or rename it. Expected: only one file keeps the name.
  4. If both must stay (for example the same model name in two packages), update references to the two-argument form ref('package_name', 'model_name'). Expected: every ref is unambiguous.
  5. Run dbt parse and then dbt compile. Expected: no duplicate-name error.

When to use

  • dbt parse fails with "found two resources with the same name".
  • You just installed a package that ships a model name you already use.

When not to use

  • Two models read from the same source table (that is fine; names are what must be unique).
  • A model and a test share a name pattern (tests live in a separate namespace).

Tool compatibility

  • dbt Core 1.0 and later, all adapters. Resource uniqueness rules are adapter-independent.

Variant phrasings

dbt found two seeds / two snapshots with the same name

Same rule across resource types: seeds, snapshots, and models share one namespace per type.

Ambiguous reference after installing dbt-utils or a community package

The package brought a colliding name; scope your refs or rename your model.

Why it happens

dbt addresses nodes by name in ref(). Two nodes with one name make every downstream ref ambiguous, so dbt fails fast at parse time instead of picking one silently.

Edge cases

  • A model and a seed with the same name also collide; rename the seed file.
  • Disabled models still count for name uniqueness in some versions; check enabled configs.
  • File name casing differences (Orders.sql vs orders.sql) collide on case-insensitive filesystems.

Provenance

Resolved from the public thread: https://vectle.com/posts/pst_TlIUMM0gXMGkUifYAVllRA

Maintainer review

No maintainer verification is recorded for this version.

This records the version a maintainer checked. It does not assert that the version is the latest upstream release.

Published recentlyPublished Oct 10, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 8, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

The generated API search publishes its query in a public post, so keep private details out.

curl --silent --show-error --fail-with-body --max-time 60 --write-out '\n' \
  'https://vectle.com/api/v1/search?q=dbt+found+two+resources+with+the+same+name%22+duplicate+model&type=skill'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.