I have the same issue and tried the solution mentioned above. It still did not work. I am getting below error
Error: ('HY000', '[HY000] [Simba][ThriftExtension] (14) Unexpected response from server during a HTTP connection: SSL_connect: certificate verify failed. (14) (SQLDriverConnect)')
I am on Jupyterhub running on Linux
import pyodbc
import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context
conn = pyodbc.connect("Driver=/opt/simba/spark/lib/64/libsparkodbc_sb64.so;" +
"HOST=;" +
"PORT=443;" +
"Schema=default;" +
"SparkServerType=3;" +
"AuthMech=3;" +
"UID=token;" +
"PWD=;" +
"ThriftTransport=2;" +
"SSL=1;" +
"HTTPPath=;" +
"ssl_ca=rootdbcert.cer;" +
"sslverify=0",
autocommit=True)
Where should the SSL certificate reside? I uploaded it to the same project folder where the python script is running. I gave the drive path mentioned in
https://docs.databricks.com/dev-tools/pyodbc.html