Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dbt/adapters/sqlserver/sql_server_connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ def connect():
con_str_concat,
attrs_before=attrs_before,
autocommit=True,
timeout=credentials.login_timeout,
)
handle.timeout = credentials.query_timeout
logger.debug(f"Connected to db: {credentials.database}")
return handle

Expand Down
4 changes: 4 additions & 0 deletions dbt/adapters/sqlserver/sql_server_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class SQLServerCredentials(Credentials):
trust_cert: Optional[bool] = False # default value in MS ODBC Driver 18 as well
retries: int = 1
schema_authorization: Optional[str] = None
login_timeout: Optional[int] = 0
query_timeout: Optional[int] = 0

_ALIASES = {
"user": "UID",
Expand Down Expand Up @@ -58,6 +60,8 @@ def _connection_keys(self):
"encrypt",
"trust_cert",
"retries",
"login_timeout",
"query_timeout",
)

@property
Expand Down