From 1c2a14a0ca32c9cce6387044fb39ab7008db01f2 Mon Sep 17 00:00:00 2001 From: LProcopi15 Date: Mon, 13 Jan 2025 13:19:28 -0800 Subject: [PATCH] switch if/else pattern --- dbt/adapters/snowflake/relation.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dbt/adapters/snowflake/relation.py b/dbt/adapters/snowflake/relation.py index d8233a6cf..e068e68d1 100644 --- a/dbt/adapters/snowflake/relation.py +++ b/dbt/adapters/snowflake/relation.py @@ -204,10 +204,11 @@ def get_ddl_prefix_for_alter(self) -> str: return "" def get_iceberg_ddl_options(self, config: RelationConfig) -> str: + base_location: str = f"_dbt/{self.schema}/{self.name}" + + # If the base_location config is supplied, overwrite the default value if base_path := config.get("base_location"): - base_location: str = f"{base_path}" - else: - base_location: str = f"_dbt/{self.schema}/{self.name}" + base_location = f"{base_path}" if subpath := config.get("base_location_subpath"): base_location += f"/{subpath}"