I am trying to connect to our cloud-based SQL Server database using Python. How to pass to pyodbc
or mssql
connector the ODBC driver name, IAM authentication and access token information? If it cannot be done with pyodbc
and mssql
, can SQLAlchemy be the solution?
I tried with pyodbc and it worked when I provided the DSN. I run the code locally (on my desktop) and Python looked up the windows registry where the detailed information of the DSN is located. However, when I used the same code online, in a code repository file, it did not work as it could not access my local registry.