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

Call scala application jar in notebook

sgarcia
New Contributor II

Hi,

Is there any way to execute jar scala-spark application inside the notebook, without using jobs?

I have different jars for different intakes and I want to call them from a notebook, so I could call them in a parameterized way.

Thanks

4 REPLIES 4

RKNutalapati
Valued Contributor

Hi @Sergio Garcciaโ€‹ ,

Try below and let me know if it works.

scala -cp <Your Jar> <Main Class> <arguments>

If you are using job cluster add the jar as dependency

Thanks

sgarcia
New Contributor II

Hi @Rama Krishna Nโ€‹ ,

It doesn't work, I think that its not recognizing scala command

Thanks!!

User16763506477
Contributor III

Hi @Sergio Garcciaโ€‹, you can attach the jar to the cluster. Then import the package containing the main method and call the main method from the notebook.

jose_gonzalez
Databricks Employee
Databricks Employee

Hi @Sergio Garcciaโ€‹ ,

Just a friendly follow-up. Do you still need help? have you check our docs? This might help https://docs.databricks.com/workflows/jobs/jobs.html#jar-jobs-1

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