Databricks widgets

Anshal 1,866 Reputation points
2022-05-05T11:04:06.743+00:00

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
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,917 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-05-06T11:22:32.1+00:00

    Hi @Anshal ,

    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.