Skip to content

Commit 5fba80c

Browse files
Omit external volume from DDL when not provided (#1192)
Co-authored-by: Colin Rogers <[email protected]>
1 parent 91cbc2f commit 5fba80c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Fixes
2+
body: Omit external volume from DDL when not provided in the YAML file
3+
time: 2025-07-18T09:22:25.851623+02:00
4+
custom:
5+
Author: dlouseiro
6+
Issue: "772"

dbt-snowflake/src/dbt/adapters/snowflake/relation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ def get_iceberg_ddl_options(self, config: RelationConfig) -> str:
209209

210210
external_volume = config.get("external_volume") # type:ignore
211211
iceberg_ddl_predicates: str = f"""
212-
external_volume = '{external_volume}'
213212
catalog = 'snowflake'
214213
base_location = '{base_location}'
215214
"""
215+
if external_volume := config.get("external_volume"): # type:ignore
216+
iceberg_ddl_predicates += f"\nexternal_volume = '{external_volume}'"
216217
return textwrap.indent(textwrap.dedent(iceberg_ddl_predicates), " " * 10)
217218

218219
def __drop_conditions(self, old_relation: "SnowflakeRelation") -> Iterator[Tuple[bool, str]]:

0 commit comments

Comments
 (0)