call job parameter in notebook

Hritik_Moon
Databricks Partner

Notebook1 as a list output (d_list) and stored in a taskValue

N1.png

I have provided this as input to a loop for notebook 2

loopInput.png

These are the parameters for notebook2

N2.png

 

job.png

 

How do I get the value of the parameters file_name and file_format inside notebook2?

when I try print(file_name) it gives error file_name is not defined.

szymon_dybczak
Esteemed Contributor III

Hi,

In notebook2 define 2 widget parameters that will receive those parameters

 

dbutils.widgets.text("file_name", "")
file_name= dbutils.widgets.get("file_name")
 
dbutils.widgets.text("file_format", "")
file_format= dbutils.widgets.get("file_format")

View solution in original post

szymon_dybczak
Esteemed Contributor III

Let me know if you managed to do it @Hritik_Moon in a way I described above. In case of any issues I can prepare for you an end to end example 🙂

Thanks @szymon_dybczak you are a great help. 😊

 

szymon_dybczak
Esteemed Contributor III

No problem @Hritik_Moon , glad that could help 🙂