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: 

How can I add jars ("spark.jars") to pyspark notebook?

dbansal
New Contributor

I want to add a few custom jars to the spark conf. Typically they would be submitted along with the spark-submit command but in Databricks notebook, the spark session is already initialized. So, I want to set the jars in "spark.jars" property in the conf. Even if I'm able to create a new session with the new conf, it seems to be not picking up the jars. Is there any better way to add jars?

1 REPLY 1

shyam_9
Databricks Employee
Databricks Employee

Hi @dbansal, Install the libraries/jars while initialising the cluster.

Please go through the documentation on the same below,

https://docs.databricks.com/libraries.html#upload-a-jar-python-egg-or-python-wheel

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