cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

I am trying to connect to Azure Databricks SQL from my Spring Boot Application. is it possible to connect using the JDBC URL details. OR is it NOT supported yet. Please let me know.

Vamsee
New Contributor II
1 ACCEPTED SOLUTION

Accepted Solutions

User16871418122
Contributor III

Hi @Vamsee krishna kanth Arcotโ€‹ Yes, currently you will have to download the JDBC from https://databricks.com/spark/jdbc-drivers-download and connect from other applications with JDBC URL just like you mentioned in your example.

There is an internal request (DB-I-4081 Publish databricks JDBC driver to maven central). This request shall be upvoted if you own a databricks ideas portal login. The upvotes would accelerate the priority of this request.

View solution in original post

4 REPLIES 4

Prabakar
Databricks Employee
Databricks Employee

Hi @Vamsee krishna kanth Arcotโ€‹  Databricks classloader does not support loading classes from the Spring Boot uber jar.

There is a workaround that involves

  1. Using an init script, you can replace the default spring jar installed in databricks cluster with required version. Follow the steps mentioned in the KB: https://docs.microsoft.com/en-us/azure/databricks/kb/libraries/replace-default-jar-new-jar
  2. Use the maven-shade-plugin to build the jar

Prabakar
Databricks Employee
Databricks Employee

Hi @Vamsee krishna kanth Arcotโ€‹ did the workaround help you resolve the issue?

Vamsee
New Contributor II

Hi @Prabakar Ammeappinโ€‹ ,

I didnot understand what are u referring to .

anyways I could download the jar SparkJDBC42.jar and include it in my spring boot application in IntelliJ IDE.

also I am trying to connect using the below code.

DriverManagerDataSource dataSource = new DriverManagerDataSource();

dataSource.setDriverClassName("com.simba.spark.jdbc.Driver");

I am yet to test it, but my question is since the JAR is NOT available through maven, what is the alternative ?.

Do we need to manually install it on every server irrespective of whether it is dev/qa/prod.

User16871418122
Contributor III

Hi @Vamsee krishna kanth Arcotโ€‹ Yes, currently you will have to download the JDBC from https://databricks.com/spark/jdbc-drivers-download and connect from other applications with JDBC URL just like you mentioned in your example.

There is an internal request (DB-I-4081 Publish databricks JDBC driver to maven central). This request shall be upvoted if you own a databricks ideas portal login. The upvotes would accelerate the priority of this request.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group