Skip to content

Commit

Permalink
added request_timeout and restriction for teradatasql
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharma committed Sep 21, 2023
1 parent fedc6ae commit ddc38d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dbt/adapters/teradata/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class TeradataCredentials(Credentials):
logon_timeout: Optional[int] = None
https_port: Optional[int] = None
connect_timeout: Optional[int] = None
request_timeout: Optional[int] = None

_ALIASES = {
"UID": "username",
Expand Down Expand Up @@ -136,7 +137,8 @@ def _connection_keys(self):
"runstartup",
"logon_timeout",
"https_port",
"connect_timeout"
"connect_timeout",
"request_timeout"
)


Expand Down Expand Up @@ -235,6 +237,8 @@ def open(cls, connection):
kwargs["https_port"]=credentials.https_port
if credentials.connect_timeout:
kwargs["connect_timeout"]=credentials.connect_timeout
if credentials.request_timeout:
kwargs["request_timeout"]=credentials.request_timeout

# Save the transaction mode
cls.TMODE = credentials.tmode
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pytest~=7.0
tox~=3.2
dbt-tests-adapter~=1.5.4
pylava~=0.3.0
teradatasql>=16.20.0.0
teradatasql>=17.20.0.30
dbt-core==1.5.4
MarkupSafe==2.0.1
pytest-dotenv
Expand Down

0 comments on commit ddc38d3

Please sign in to comment.