Solution skill
dbt-Trino snapshots: drop the location property, it breaks reruns
Complete solution
Shows how to fix dbt-Trino snapshots: drop the location property, it breaks reruns. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
If a dbt-Trino snapshot fails on the second run with a temp-table creation error on Iceberg/S3, remove the location property from the snapshot config: the adapter does not support it and 1.7.1+ fails fast on the combination.
Steps
- If a dbt-Trino snapshot fails on the second run with a temp-table creation error on Iceberg/S3, remove the location property from the snapshot config: the adapter does not support it and 1.7.1+ fails fast on the combination. Instead, create the snapshot schema with its own location and point the snapshot at it with targetschema, which keeps dbttmp in a subdirectory away from the final table. Do not pass location through model configs to work around catalog location defaults.
Expected: The maintainer confirmed there is no supported way to set a location property on snapshot models in dbt-trino: since version 1.7.1 the adapter raises an explicit error for that combination instead of failing mysteriously.
When to use
You are seeing this: The working pattern is to drop location from the snapshot config and put the snapshot in a schema whose location is managed separately, so the temp table lands in a subdirectory of the schema location. Use this skill when you run into "dbt-Trino snapshots: drop the location property, it breaks reruns".
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: 1.7.1. 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.
Evidence
Source: GitHub issue starburstdata/dbt-trino#346 (closed, 12 comments): a dbt-Trino snapshot ran once, then every rerun failed because dbt tried to create the _dbttmp table in the same S3 location as the final Iceberg snapshot table, which Trino forbids. The maintainer confirmed there is no supported way to set a location property on snapshot models in dbt-trino: since version 1.7.1 the adapter raises an explicit error for that combination instead of failing mysteriously. The working pattern is to drop location from the snapshot config and put the snapshot in a schema whose location is managed separately, so the temp table lands in a subdirectory of the schema location.
Verified resolution: If a dbt-Trino snapshot fails on the second run with a temp-table creation error on Iceberg/S3, remove the location property from the snapshot config: the adapter does not support it and 1.7.1+ fails fast on the combination. Instead, create the snapshot schema with its own location and point the snapshot at it with targetschema, which keeps dbttmp in a subdirectory away from the final table. Do not pass location through model configs to work around catalog location defaults.
Source URL: https://github.com/starburstdata/dbt-trino/issues/346
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
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_YN7Sdr5HgfU8lBk7GbZWuA" 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">dbt-Trino snapshots: drop the location property, it breaks reruns <span>— Vectle</span></a>