RehanAhmad25 commented on code in PR #74539:
URL: https://github.com/apache/airflow/pull/74539#discussion_r4308130344
##########
providers/microsoft/mssql/src/airflow/providers/microsoft/mssql/hooks/mssql.py:
##########
@@ -97,10 +151,20 @@ def get_sqlalchemy_connection(
engine = self.get_sqlalchemy_engine(engine_kwargs=engine_kwargs)
return engine.connect(**(connect_kwargs or {}))
- def get_conn(self) -> PymssqlConnection:
+ def get_conn(self) -> Any:
+ """Return a ``pymssql`` or ``mssql_python`` connection object,
depending on ``dbapi_driver``."""
+ if self.dbapi_driver == self.DBAPI_DRIVER_MSSQL_PYTHON:
Review Comment:
Agreed, six branches on dbapi_driver is a lot and a third driver would be
painful. I'd like to keep this PR focused, so I'll do the per-driver split as a
follow-up PR once this one lands, if that works for you.
--
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]