From 1971d8b0192e9c8466734a5ada3660e80dfa88ab Mon Sep 17 00:00:00 2001 From: Ayush Shah Date: Mon, 13 May 2024 11:05:27 +0530 Subject: [PATCH] Minor: Fix AzureSQL Authentication mode error (#16225) --- .../ingestion/source/database/azuresql/connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/database/azuresql/connection.py b/ingestion/src/metadata/ingestion/source/database/azuresql/connection.py index 9fd23b2fa19..185e38dc66e 100644 --- a/ingestion/src/metadata/ingestion/source/database/azuresql/connection.py +++ b/ingestion/src/metadata/ingestion/source/database/azuresql/connection.py @@ -41,7 +41,10 @@ def get_connection_url(connection: Union[AzureSQLConnection, MssqlConnection]) - Build the connection URL """ - if connection.authenticationMode: + if ( + hasattr(connection.authenticationMode, "authentication") + and connection.authenticationMode.authentication is not None + ): connection_string = f"Driver={connection.driver};Server={connection.hostPort};Database={connection.database};" connection_string += f"Uid={connection.username};" if (