Is there a way to connect to azure databricks using JDBC

afraz
Giga Guru

Hi,

 

i am looking at a way to connect to Azure databricks using JDBC to pull data. Has anyone been able to successfully create a connection with databricks?

1 ACCEPTED SOLUTION

Okay so i was able to connect to databricks using JDBC. Below are the steps

 

1. Create a new JDBC data source for Databricks.

2. Create a new Format value for Databricks. Existing ones usually are MySQL/Oracle/SQL Server. Add one more for Databricks

3. In the value field for the new choice value add the below statement

  •         com.databricks.client.jdbc.Driver

4. bring the connection url field on the form of the Data source previously created and add the  JDBC connection url directly. you can get it from the databricks administrators. usually looks like below

  • databricks://xx.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/xx;AuthMech=11;Auth_Flow=1;OAuth2ClientId=xx;OAuth2Secret=xx;

5. Download the Databricks JAR file from databricks website. the name is DatabricksJDBC42.jar

6. Upload this file to the MID Server from the JAR Files menu item under the MID Server

7. Restart the MID Server

8. Add your SQL statement to the data source previously created and test your data source.

View solution in original post

12 REPLIES 12

Vinay Kumar R
Tera Contributor

Anyone success in connecting ServiceNow with Azure databricks using JDBC ? Please share the steps. 

Okay so i was able to connect to databricks using JDBC. Below are the steps

 

1. Create a new JDBC data source for Databricks.

2. Create a new Format value for Databricks. Existing ones usually are MySQL/Oracle/SQL Server. Add one more for Databricks

3. In the value field for the new choice value add the below statement

  •         com.databricks.client.jdbc.Driver

4. bring the connection url field on the form of the Data source previously created and add the  JDBC connection url directly. you can get it from the databricks administrators. usually looks like below

  • databricks://xx.azuredatabricks.net:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/xx;AuthMech=11;Auth_Flow=1;OAuth2ClientId=xx;OAuth2Secret=xx;

5. Download the Databricks JAR file from databricks website. the name is DatabricksJDBC42.jar

6. Upload this file to the MID Server from the JAR Files menu item under the MID Server

7. Restart the MID Server

8. Add your SQL statement to the data source previously created and test your data source.

kmannem
Tera Contributor

Hi Afraz,

 

Do we need a MID server to establish the connection? We want to pull a column from Databricks and store it in a table that updates automatically.

Do we need any plugins on ServiceNow for this? We are on ITSM standard and have iHub. We also have a MID server for CMDB. Can we use the same MID server, or do we need a different one? Should this MID server have SQL Server Studio on it?

 

Thanks,

Kushala

You dont need additional plugins. Follow the steps in the solution and you should be able to connect. You can use your existing MID Server for this purpose.