eladkal commented on code in PR #25185:
URL: https://github.com/apache/airflow/pull/25185#discussion_r926507058


##########
airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -51,6 +51,13 @@ def get_conn(
         )
         return conn
 
+    def get_uri(self) -> str:
+        from urllib.parse import urlsplit, urlunsplit
+
+        r = list(urlsplit(super().get_uri()))
+        r[0] = "mssql+pymssql"  # fix to use pymssql driver
+        return urlunsplit(r)

Review Comment:
   Is this the right way?
   This is what we have in OdbcHook
   
https://github.com/apache/airflow/blob/46bbfdade0638cb8a5d187e47034b84e68ddf762/airflow/providers/odbc/hooks/odbc.py#L34
   
   and users can override this
   
https://airflow.apache.org/docs/apache-airflow-providers-odbc/stable/connections/odbc.html#configuring-the-connection



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to