diff --git a/.changes/1.5.0/Features-20230307-140933.yaml b/.changes/1.5.0/Features-20230307-140933.yaml deleted file mode 100644 index be6f13bc8..000000000 --- a/.changes/1.5.0/Features-20230307-140933.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Features -body: take over pr:103 to allow Macro for custom warehouse selection -time: 2023-03-07T14:09:33.713772-06:00 -custom: - Author: javiCalvo - Issue: "438" diff --git a/dbt/adapters/snowflake/impl.py b/dbt/adapters/snowflake/impl.py index 55cef30fa..28ecfe94c 100644 --- a/dbt/adapters/snowflake/impl.py +++ b/dbt/adapters/snowflake/impl.py @@ -18,9 +18,6 @@ from dbt.utils import filter_null_values -SNOWFLAKE_WAREHOUSE_MACRO_NAME = "snowflake_warehouse" - - @dataclass class SnowflakeConfig(AdapterConfig): transient: Optional[bool] = None @@ -74,10 +71,8 @@ def _get_warehouse(self) -> str: raise DbtRuntimeError("Could not get current warehouse: no results") return str(table[0][0]) - def _use_warehouse(self, warehouse): + def _use_warehouse(self, warehouse: str): """Use the given warehouse. Quotes are never applied.""" - kwargs = {"warehouse": warehouse} - warehouse = self.execute_macro(SNOWFLAKE_WAREHOUSE_MACRO_NAME, kwargs=kwargs) # type: ignore self.execute("use warehouse {}".format(warehouse)) def pre_model_hook(self, config: Mapping[str, Any]) -> Optional[str]: diff --git a/dbt/include/snowflake/macros/etc.sql b/dbt/include/snowflake/macros/etc.sql deleted file mode 100644 index f77925599..000000000 --- a/dbt/include/snowflake/macros/etc.sql +++ /dev/null @@ -1,3 +0,0 @@ -{% macro snowflake_warehouse(warehouse) -%} - {{ return(warehouse) }} -{%- endmacro %}