From 6aad3eb2868efd092dae484bfaab77d053d1d9ca Mon Sep 17 00:00:00 2001 From: Pradeep Srikakolapu Date: Thu, 1 Feb 2024 22:11:33 -0800 Subject: [PATCH] Added retry count to allow driver to retry connections before manual retries when connections are lost --- dbt/adapters/fabric/__version__.py | 2 +- dbt/adapters/fabric/fabric_connection_manager.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dbt/adapters/fabric/__version__.py b/dbt/adapters/fabric/__version__.py index a26c301..582554e 100644 --- a/dbt/adapters/fabric/__version__.py +++ b/dbt/adapters/fabric/__version__.py @@ -1 +1 @@ -version = "1.7.3" +version = "1.7.4" diff --git a/dbt/adapters/fabric/fabric_connection_manager.py b/dbt/adapters/fabric/fabric_connection_manager.py index 1d2f37b..b84bb52 100644 --- a/dbt/adapters/fabric/fabric_connection_manager.py +++ b/dbt/adapters/fabric/fabric_connection_manager.py @@ -330,6 +330,16 @@ def open(cls, connection: Connection) -> Connection: application_name = f"dbt-{credentials.type}/{plugin_version}" con_str.append(f"APP={application_name}") + try: + if int(credentials.retries) > 0: + con_str.append(f"ConnectRetryCount={credentials.retries}") + + except Exception as e: + logger.debug( + "Retry count should be a integer value. Skipping retries in the connection string.", + str(e), + ) + con_str_concat = ";".join(con_str) index = []