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

Ajay-Pandey
Esteemed Contributor III

Hi @Sreekanth Nallapa​ please refer this link

This might help you in this

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.