Skip to content

Commit 62b1122

Browse files
haritamarclaude
andcommitted
Workaround dbt-fusion 2.0.0-preview.104 Redshift temp table bug
Disable temporary tables for Redshift when using dbt-fusion to work around a panic in preview.104's ADBC 0.22 driver. Bug: get_columns_in_relation() on temp tables causes intermittent panics with: "Either resolved_catalog or resolved_schema must be present" at fs/sa/crates/dbt-adapter/src/metadata/mod.rs:91:9 The panic occurs during INSERT operations when the ADBC driver returns empty catalog/schema metadata for temporary tables. Workaround: Disable temp tables for Redshift+fusion, using regular tables instead. This is slightly less efficient but avoids the panic. This bug was introduced in preview.104 and was not present in preview.102. Will re-enable temp tables once dbt-fusion fixes this issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent abb8112 commit 62b1122

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

macros/utils/table_operations/has_temp_table_support.sql

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,22 @@
2626
{% do return(false) %}
2727
{% endmacro %}
2828

29+
{% macro redshift__has_temp_table_support() %}
30+
{# Workaround for dbt-fusion 2.0.0-preview.104 ADBC 0.22 bug
31+
where get_columns_in_relation returns empty catalog/schema for temp tables
32+
causing panic: "Either resolved_catalog or resolved_schema must be present"
33+
at fs/sa/crates/dbt-adapter/src/metadata/mod.rs:91:9
34+
35+
This occurs intermittently during INSERT operations on temporary tables.
36+
Disabling temp tables for Redshift+fusion uses regular tables instead,
37+
which is slightly less efficient but avoids the panic.
38+
39+
Bug introduced in preview.104, not present in preview.102.
40+
TODO: Re-enable once dbt-fusion fixes this in a future release. #}
41+
{% if elementary.is_dbt_fusion() %}
42+
{% do return(false) %}
43+
{% else %}
44+
{% do return(true) %}
45+
{% endif %}
46+
{% endmacro %}
47+

0 commit comments

Comments
 (0)