Immutable solution version
dbt-Trino snapshots: drop the location property, it breaks reruns
Complete solution
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.
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.
Context: 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.
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 1 · 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>