dbt-Trino snapshots: drop the location property, it breaks reruns
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.
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.