Skip to content

Commit

Permalink
add host/port/protocol as optional profile parameters (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
laxjesse authored Nov 3, 2021
1 parent 9caa185 commit ce157c0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 15 additions & 0 deletions dbt/adapters/snowflake/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit ce157c0

Please sign in to comment.