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

Pass certificate path to api connection #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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