Commit 7f1ae0e
fix: Remove external path on intermediate tables for python incremental models (#1161)
<!-- Please review our pull request review process in CONTRIBUTING.md
before your proceed. -->
<!---
Include the number of the issue addressed by this PR above if
applicable.
Example:
resolves #1234
Please review our pull request review process in CONTRIBUTING.md before
your proceed.
-->
### Description
This update changes how intermediate tables are handled for Python
incremental models (with Materialization V2). Previously, when Python
models were configured to save as external tables, their intermediate
tables were also stored in the external path. This caused two main
issues:
- Concurrency problems: Even when using unique_tmp_table_suffix=True,
all runs shared the same external path, leading to conflicts.
- Unnecessary storage: Data from intermediate tables was not deleted
when the tables were dropped, leaving unwanted files in the storage
account.
With this change, intermediate tables will be stored as managed tables,
which will:
- Prevent concurrency issues by ensuring each run uses a unique
location.
- Automatically remove intermediate data after dbt execution, keeping
storage clean and efficient.
<!--- Describe the Pull Request here -->
### Checklist
- [x] I have run this code in development and it appears to resolve the
stated issue
- [x] This PR includes tests, or tests are not required/relevant for
this PR
- [x] I have updated the `CHANGELOG.md` and added information about my
change to the "dbt-databricks next" section.
---------
Co-authored-by: Ben Cassell <98852248+benc-db@users.noreply.github.com>1 parent d83f9f1 commit 7f1ae0e
2 files changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | 173 | | |
179 | 174 | | |
180 | 175 | | |
181 | | - | |
| 176 | + | |
0 commit comments