Commit ba301d3
Fix breaking changes in recent dbt-fusion version (#920)
* Remove dbt-fusion version pin to use latest version
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Restore .dbt-fusion-version with 'latest' to use latest dbt-fusion version
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Update CI to use Python 3.10 and latest dbt-fusion version
- Update Python version from 3.9 to 3.10 (required by elementary-data package)
- Remove .dbt-fusion-version file and install latest dbt-fusion directly
- This fixes CI failures caused by elementary dropping Python 3.9 support
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Restore .dbt-fusion-version with version 2.0.0-preview.102
The workflow runs from master branch which still expects this file.
This updates the version from 2.0.0-preview.76 to 2.0.0-preview.102.
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Fix: Handle None ignore_small_changes in dbt-fusion
dbt-fusion fails with 'none has no method named items' when
ignore_small_changes is None. This fix:
1. Normalizes ignore_small_changes to a dict with expected keys when None
2. Adds early return in validate_ignore_small_changes when None
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Add debug logs to investigate dbt-fusion test failures
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Skip dbt-fusion incompatible tests and remove debug logs
- Add skip_for_dbt_fusion marker to test_schema_changes (dbt-fusion caches column info)
- Add skip_for_dbt_fusion marker to test_dbt_invocations (invocation_args_dict is empty)
- Add skip_for_dbt_fusion marker to test_sample_count_unlimited (test meta not passed through)
- Remove debug logs from get_columns_snapshot_query.sql
- Remove debug logs from upload_dbt_invocation.sql
- Remove debug logs from test.sql
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Add debug log to find_normalized_data_type_for_column to investigate timestamp issue
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Fix timestamp_ltz/timestamp_ntz recognition for Databricks/Spark
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Fix test_sample_count_unlimited: put meta at top level for dbt-fusion compatibility
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Revert meta top-level change: dbt-fusion says it's deprecated, re-add skip markers
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* fix test_override_samples_config and allow -1 for unlimited samples
* dbt invocations fusion fixes
* update dbt fusion version
* exposure schema validity - works in fusion
* error statuses now properly supported
* failed row count now works in fusion
* Fix test_schema_changes: clear dbt-fusion schema cache after seeding
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Add 'numeric' to data type lists for targets missing it (spark, athena, trino, clickhouse, dremio)
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* Fix race condition: remove global cache clearing that caused parallel test hangs
The cache clearing after seed() was causing race conditions because all
parallel test workers (gw0-gw7) share the same project_dir_copy directory.
When one worker cleared target/schemas while another was using it, the
other worker would hang.
Changes:
- Remove _clear_fusion_schema_cache_if_needed() from seed()
- Re-add skip_for_dbt_fusion marker to test_schema_changes
- Remove unused shutil import
Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
* 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>
* Complete dbt-fusion Redshift temp table workaround
The previous fix (62b1122) only covered create_intermediate_relation(),
but test materializations and other paths still created temp tables,
causing the same ADBC 0.22 panic.
This adds redshift__edr_get_create_table_as_sql() to intercept ALL
temporary table creation in Redshift+fusion, creating regular tables
instead. These are cleaned up by Elementary's normal cleanup logic.
Fixes all remaining instances of:
panic: "Either resolved_catalog or resolved_schema must be present"
at fs/sa/crates/dbt-adapter/src/metadata/mod.rs:91:9
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix dbt-fusion Redshift temp table panic with comprehensive workaround
The previous fix only covered some code paths. This adds three complementary
Redshift-specific overrides that work together to completely eliminate the
"Either resolved_catalog or resolved_schema must be present" panic:
1. redshift__edr_get_create_table_as_sql - Creates regular tables instead
of temp tables when temporary=True in fusion (avoiding CREATE OR REPLACE
which Redshift doesn't support for tables)
2. redshift__edr_make_intermediate_relation - Creates relation objects with
explicit schema/database for intermediate tables used in delete_and_insert
and replace_table_data operations
3. redshift__edr_make_temp_relation - Creates relation objects with explicit
schema/database for all temp relations (used by make_temp_view_relation
and other temp relation creation paths)
All temp tables are now created as regular tables with timestamped names
(e.g., *__tmp_*) that get cleaned up by Elementary's normal cleanup logic.
Tested with: py.test -k test_collect_no_timestamp_metrics --runner-method=fusion --target=redshift
Result: 1 passed (was previously panicking)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix dbt-fusion Redshift: temp tables incompatible with connection pooling
After testing, discovered that temp tables don't work with dbt-fusion on
Redshift due to session isolation from connection pooling, not just metadata
bugs. Temp tables created in one session aren't visible in other sessions,
causing "relation does not exist" errors.
Solution uses three complementary fixes:
1. redshift__edr_make_temp_relation & redshift__edr_make_intermediate_relation
- Create relation objects with explicit schema/database to prevent the
"Either resolved_catalog or resolved_schema must be present" panic
that occurs when dbt-fusion queries metadata with empty catalog/schema
2. redshift__has_temp_table_support returns false
- Signals that temp tables shouldn't be used with fusion
3. redshift__edr_get_create_table_as_sql
- Backup defense: creates regular tables if temporary=true slips through
- Regular tables with timestamped names (e.g., *__tmp_*) are cleaned up
by Elementary's normal cleanup logic
Tested: py.test -k test_collect_no_timestamp_metrics --runner-method=fusion --target=redshift
Result: 1 passed (previously panicked, then "relation does not exist" with actual temp tables)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove unused .dbt-fusion-version file
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Itamar Hartstein <haritamar@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5dd2198 commit ba301d3
19 files changed
Lines changed: 169 additions & 80 deletions
File tree
- .github/workflows
- integration_tests/tests
- macros
- edr
- dbt_artifacts
- materializations/test
- tests
- on_run_end
- test_configuration
- utils
- data_types
- graph
- table_operations
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
Lines changed: 52 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
7 | 24 | | |
8 | 25 | | |
9 | 26 | | |
10 | 27 | | |
11 | 28 | | |
12 | | - | |
13 | 29 | | |
14 | 30 | | |
15 | 31 | | |
| |||
28 | 44 | | |
29 | 45 | | |
30 | 46 | | |
31 | | - | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
| |||
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
50 | | - | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
57 | 71 | | |
58 | | - | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
| |||
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
91 | | - | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
| |||
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
| 126 | + | |
114 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
115 | 137 | | |
116 | | - | |
117 | | - | |
| 138 | + | |
| 139 | + | |
118 | 140 | | |
119 | | - | |
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
123 | 144 | | |
124 | | - | |
125 | 145 | | |
126 | 146 | | |
127 | 147 | | |
| |||
155 | 175 | | |
156 | 176 | | |
157 | 177 | | |
| 178 | + | |
158 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
159 | 189 | | |
160 | | - | |
161 | | - | |
| 190 | + | |
| 191 | + | |
162 | 192 | | |
163 | | - | |
164 | 193 | | |
165 | 194 | | |
166 | 195 | | |
167 | | - | |
168 | 196 | | |
169 | 197 | | |
170 | 198 | | |
| |||
188 | 216 | | |
189 | 217 | | |
190 | 218 | | |
191 | | - | |
192 | 219 | | |
193 | 220 | | |
194 | 221 | | |
| |||
211 | 238 | | |
212 | 239 | | |
213 | 240 | | |
214 | | - | |
215 | | - | |
216 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | | - | |
48 | 45 | | |
49 | 46 | | |
50 | 47 | | |
| |||
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | 64 | | |
69 | 65 | | |
70 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 90 | + | |
| 91 | + | |
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
| |||
106 | 102 | | |
107 | 103 | | |
108 | 104 | | |
109 | | - | |
| 105 | + | |
110 | 106 | | |
111 | 107 | | |
112 | | - | |
| 108 | + | |
113 | 109 | | |
114 | 110 | | |
115 | 111 | | |
| |||
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
136 | | - | |
137 | 131 | | |
138 | 132 | | |
139 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 58 | + | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
68 | | - | |
69 | | - | |
| 63 | + | |
| 64 | + | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
76 | | - | |
| 71 | + | |
77 | 72 | | |
78 | 73 | | |
79 | 74 | | |
| |||
167 | 162 | | |
168 | 163 | | |
169 | 164 | | |
170 | | - | |
| 165 | + | |
171 | 166 | | |
172 | 167 | | |
173 | 168 | | |
| |||
181 | 176 | | |
182 | 177 | | |
183 | 178 | | |
184 | | - | |
| 179 | + | |
185 | 180 | | |
186 | 181 | | |
187 | 182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
0 commit comments