cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
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. 

2 REPLIES 2

JonLaRose
New Contributor III

Hi @Kaniz ,

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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.