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 to pass job task parameters to another task in scala

Sreekanth1
New Contributor II

Hi Team,

โ€‹

I have a requirement in workflow job. Job has two tasks, one is python-task and another one is scala-task (both are running their own cluster).

โ€‹

I have defined dbutils.job.taskValue in python which is not able to read value in scala because of job.taskValue is not supported in scala.

โ€‹

So, the question is,

how to pass custom parameters to task 2 ( scala )?โ€‹.

โ€‹

Is dbutil.widget can work here by setText in python-task and read widget.get in scala-task ?.

โ€‹

Do we have any approaches?.

โ€‹

Note : We shouldn't use notebook.run.โ€‹

โ€‹

2 REPLIES 2

UmaMahesh1
Honored Contributor III

Hi @Sreekanth Nallapaโ€‹ 

Assuming that you want to pass python notebook params to scala nb. Else dbutils.jobs.taskValues is also available in scala.

If you want to pass parameters from py nb to scala nb or vice-versa,

try using dbutils.notebook.exit() and for the returnValue part, return the parameter you want.

You can then pull the exited value into your other notebook.

Cheers..

Uma Mahesh D

Ajay-Pandey
Esteemed Contributor III

Hi @Sreekanth Nallapaโ€‹ please refer this link

This might help you in this

Ajay Kumar Pandey

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