You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/21 21:07:04 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #25185: 25092: MsSqlHook: fix for get_uri, adding pymssql driver to scheme

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


##########
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:
   Still some pre-commits failed. I recommend (as in CONTRIBUTORS_GUIDE) to install pre-commit - it will fix most things automatically. Also `breeze static-check --last-commit` re-runs all relevant pre-commits for you automatically on last commit (so you need to rebase&squash to single commit before).



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org