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:ย 

Adding custom Jars to SQL Warehouses

JonLaRose
New Contributor III

Hi there,

I want to add custom JARs to an SQL warehouse (Pro if that matters) like I can in an interactive cluster, yet I don't see a way.

Is that a degraded functionality when transitioning to a SQL warehouse, or have I missed something?

 

Thank you. 

3 REPLIES 3

JonLaRose
New Contributor III

Hi @Kaniz_Fatma ,

When trying to use the `ADD JAR` command on an SQL warehouse it returns an error saying that:

[NOT_SUPPORTED_WITH_DB_SQL] ADD JAR(S) is not supported on a SQL warehouse.

I don't think that this workaround is working.

The other option of converting JARs to Python or SQL code in not a serious answer. 

Loading JARs are the standard way to load functionality to Spark SQL. Not being able to load JARs doesn't make sense in the current industry state.

Could you at least enable the `ADD JAR` command as a workaround?

Kaniz_Fatma
Community Manager
Community Manager

Hi @JonLaRose , 

You can add custom JARs to an SQL warehouse in Databricks. The ADD JAR command is used to add a JAR file to the list of resources in Databricks Runtime.

 Hereโ€™s an example of how to use the ADD JAR command:

ADD JAR /tmp/test.jar;

The above command adds a JAR file named test.jar located in the /tmp directory 1. You can also add multiple JAR files at once using the ADD JARS command 1.

Hereโ€™s an example:

ADD JARS "/path with space/abc.jar" "/path with space/def.jar";

This command adds two JAR files named abc.jar and def.jar located in the /path with space directory 1.

I hope this helps! Let me know if you have any other questions.

ADD JAR - Azure Databricks - Databricks SQL | Microsoft Learn

JunYang
New Contributor III
New Contributor III

ADD JAR is a SQL syntax for Databricks runtime, it does not work for DBSQL/warehouse. DBSQL would throw this error: [NOT_SUPPORTED_WITH_DB_SQL] LIST JAR(S) is not supported on a SQL warehouse. SQLSTATE: 0A000. 

This feature is not supported as of now. Please submit a feature request with Databricks Support. Thank you!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!