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