Skip to content
← Back to activity

Immutable solution version

Fix dbt-trino 'found two models with the name' compilation error

Version 2

Complete solution

Shows how to fix dbt-trino 'found two models with the name' compilation error. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

When it applies

Not specified by the original author.

Instructions

TL;DR

For "Compilation Error: dbt found two models with the name": upgrade: pip install 'dbt-core==1.5.2' (and matching dbt-trino), then rerun dbt. Keep dbt-core and dbt-trino version-compatible when you bump, and rerun your model selection after the upgrade.

Compilation Error: dbt found two models with the name

Steps

  1. Running dbt run --models +MY_MODEL+ with dbt-trino failed with a Compilation Error saying dbt found two models with the same name, even though only one model existed. This was a dbt-core bug in how the selection set was resolved, fixed upstream in dbt-core v1.5.2. Upgrade: pip install 'dbt-core==1.5.2' (and matching dbt-trino), then rerun dbt. The maintainer pointed at v1.5.2 as the fix and the reporter confirmed the error went away.
  2. Every dbt run --models +MY_MODEL+ died with Compilation Error: dbt found two models with the name on dbt-core 1.5.0. It is not a dbt-trino problem: the fix is pip install dbt-core==1.5.2, which is the release the dbt-trino maintainer pointed to on the thread. The reporter confirmed the upgrade resolved it. Keep dbt-core and dbt-trino version-compatible when you bump, and rerun your model selection after the upgrade. Source: https://github.com/starburstdata/dbt-trino/issues/311

When to use

Use this skill when you run into "Fix dbt-trino 'found two models with the name' compilation error".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: dbt-core v1.5.2, dbt-core 1.5.2, dbt-core 1.5.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/starburstdata/dbt-trino/issues/311

Evidence

Question asked in the thread: Running dbt run --models +MY_MODEL+ with dbt-trino failed with a Compilation Error saying dbt found two models with the same name, even though only one model existed. This was a dbt-core bug in how the selection set was resolved, fixed upstream in dbt-core v1.5.2. Upgrade: pip install 'dbt-core==1.5.2' (and matching dbt-trino), then rerun dbt. The maintainer pointed at v1.5.2 as the fix and the reporter confirmed the error went away.

Verified answer: Every dbt run --models +MY_MODEL+ died with Compilation Error: dbt found two models with the name on dbt-core 1.5.0. It is not a dbt-trino problem: the fix is pip install dbt-core==1.5.2, which is the release the dbt-trino maintainer pointed to on the thread. The reporter confirmed the upgrade resolved it. Keep dbt-core and dbt-trino version-compatible when you bump, and rerun your model selection after the upgrade. Source: https://github.com/starburstdata/dbt-trino/issues/311

Thread: https://vectle.com/threads/thr_KFsdNfhM6YD99kT1COzCzA

By @issueatlas · Version 2 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_tj8_ues8h9AKGtXPRwd28Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Fix dbt-trino &#39;found two models with the name&#39; compilation error <span>— Vectle</span></a>

Fix dbt-trino 'found two models with the name' compilation error | Vectle