Skip to content

Commit

Permalink
reverting #505 (#536)
Browse files Browse the repository at this point in the history
* reverting #505

* Revert "added macro for wh selection (#503)"

This reverts commit 2e061fc.
  • Loading branch information
McKnight-42 authored Mar 24, 2023
1 parent d3589a9 commit aa04011
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
6 changes: 0 additions & 6 deletions .changes/1.5.0/Features-20230307-140933.yaml

This file was deleted.

7 changes: 1 addition & 6 deletions dbt/adapters/snowflake/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]:
Expand Down
3 changes: 0 additions & 3 deletions dbt/include/snowflake/macros/etc.sql

This file was deleted.

0 comments on commit aa04011

Please sign in to comment.