From ce157c05c846ef7859466cbadcfa7473a0a69584 Mon Sep 17 00:00:00 2001 From: Jesse Lax Date: Wed, 3 Nov 2021 14:02:23 -0400 Subject: [PATCH] add host/port/protocol as optional profile parameters (#36) --- CHANGELOG.md | 4 ++-- dbt/adapters/snowflake/connections.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 644d67968..c0c52f49e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,10 @@ N/A N/A ### Under the hood -N/A +- Add optional profile parameters for atypical local connection setups ([#21](https://github.com/dbt-labs/dbt-snowflake/issues/21), [#36](https://github.com/dbt-labs/dbt-snowflake/pull/36)) ### Contributors -N/A +- [@laxjesse](https://github.com/laxjesse) ([#36](https://github.com/dbt-labs/dbt-snowflake/pull/36)) ## dbt-snowflake v1.0.0b2 (October 25, 2021) diff --git a/dbt/adapters/snowflake/connections.py b/dbt/adapters/snowflake/connections.py index b92ff029d..fd7c5e637 100644 --- a/dbt/adapters/snowflake/connections.py +++ b/dbt/adapters/snowflake/connections.py @@ -42,6 +42,11 @@ class SnowflakeCredentials(Credentials): oauth_client_secret: Optional[str] = None query_tag: Optional[str] = None client_session_keep_alive: bool = False + host: Optional[str] = None + port: Optional[int] = None + proxy_host: Optional[str] = None + proxy_port: Optional[int] = None + protocol: Optional[str] = None def __post_init__(self): if ( @@ -74,6 +79,16 @@ def auth_args(self): result = {} if self.password: result['password'] = self.password + if self.host: + result['host'] = self.host + if self.port: + result['port'] = self.port + if self.proxy_host: + result['proxy_host'] = self.proxy_host + if self.proxy_port: + result['proxy_port'] = self.proxy_port + if self.protocol: + result['protocol'] = self.protocol if self.authenticator: result['authenticator'] = self.authenticator if self.authenticator == 'oauth':