Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
pass certificate path to api connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Haunfelder committed Dec 13, 2021
1 parent a32f92e commit 4b94ea7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbt/adapters/presto/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PrestoCredentials(Credentials):
user: str
password: Optional[str] = None
method: Optional[str] = None
cert: Optional[str] = None
http_headers: Optional[Dict[str, str]] = None
http_scheme: Optional[str] = None
_ALIASES = {
Expand All @@ -39,7 +40,7 @@ def unique_field(self):
return self.host

def _connection_keys(self):
return ('host', 'port', 'user', 'database', 'schema')
return ('host', 'port', 'user', 'database', 'schema', 'cert')


class ConnectionWrapper(object):
Expand Down Expand Up @@ -189,6 +190,7 @@ def open(cls, connection):
auth=auth,
isolation_level=IsolationLevel.AUTOCOMMIT
)
presto_conn._http_session.verify = credentials.cert
connection.state = 'open'
connection.handle = ConnectionWrapper(presto_conn)
return connection
Expand Down

0 comments on commit 4b94ea7

Please sign in to comment.