question

Anshal-7634 avatar image
0 Votes"
Anshal-7634 asked ShaikMaheer-MSFT commented

Databricks widgets

Databricks notebooks l have widgets can we use python parameterized function to make it modular and the widgets should be there in that?

azure-databricks
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShaikMaheer-MSFT avatar image
0 Votes"
ShaikMaheer-MSFT answered ShaikMaheer-MSFT commented

Hi @Anshal-7634 ,

Thank you for posting query in Microsoft Q&A Platform.

You mean having widgets in notebook and passing those widgets values in to python parameterized function? If yes, then it is possible.

If my understanding is wrong, then kindly elaborate more on ask with simple example if possible.

Please check below example, in which I have two widgets firstname and lastname. Also, I have one python parameterized function getFullname(). In tho this function I am passing values from my widgets and we can see its working fine.

199577-image.png

Hope this helps. Please let us know if any further queries. Thank you.


Please consider hitting Accept Answer button. Accepted answers help community as well.


image.png (187.6 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Anshal-7634 ,

Just checking in to see if the above answer helped. If this answers your query, do click 130616-image.png and upvote 130671-image.png for the same. And, if you have any further query do let us know.

0 Votes 0 ·