1
votes

I am simply trying to setup an ODBC driver to Databricks Cluster. According to the MS documentation https://docs.microsoft.com/en-us/azure/databricks/kb/bi/jdbc-odbc-troubleshooting If you get an TTransport exception using the curl command, you successfully reached and authenticated.

When I run...

curl https://adb-77180857967XXXXX.6.azuredatabricks.net:443/sql/protocolv1/o/7718085796704186/0910-172424-pizza885 -H "Authorization: Bearer XXXXX"

It does produce the error which indicates success...

Error 500 Server Error
HTTP ERROR 500
<p>Problem accessing /cliservice. Reason:
<pre>    Server Error</pre></p><h3>Caused by:</h3><pre>javax.servlet.ServletException: org.apache.thrift.transport.TTransportException

When I test the connection from the ODBC driver I get the following error: FAILED! [Simba][ThriftExtension] (14) Unexpected response from server during a HTTP connection: Could not resolve host for client socket..

1

1 Answers

4
votes

If the response contains a TTransportException (the error is expected) like the following, it means that the gateway is functioning properly and you have passed in valid credentials. If you are not able to connect with the same credentials, check that the client you are using is properly configured and is using the [latest Simba drivers (version >= 1.2.0)].

<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /cliservice. Reason:
<pre> javax.servlet.ServletException: org.apache.thrift.transport.TTransportException</pre></p>

How to configure ODBC driver configuration in Azure Databricks.

Step 1: Download and install a ODBC driver

Step 2: Gather ODBC connection parameters

From Databricks portal => On the cluster configuration page => click the Advanced Options toggle => Click the JDBC/ODBC tab. It contains the hostname, port, protocol, HTTP path, and JDBC URL.

enter image description here

Step3: Gather Username and password

Username: token Password: , created using the procedure in Generate a personal access token.

enter image description here

Step4: Configure Simba Spark ODBC Driver DSN setup

Open ODBC Data Sources => Under User DSN => Create a new simba Spark ODBC Driver DSN setup

Add the below properties, which we gathered in step2:

Host(s): adb-8159029426904320.0.azuredatabricks.net
Port: 443

User Name: token
Password: <personal-access-token>

Click on HTTP Options and add HTTP Path.

HTTP Path: sql/protocolv1/o/8159029426904320/0925-105713-bite618

enter image description here

Step5: Now it time to click on test.

enter image description here

We have successfully connected to ODBC driver.