cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Widgets - Way to validate config parameters

Digan_Parikh
Valued Contributor

Yes, you can use the widgets api to have some control to validate the input before you pass the values to the rest of your code

For example:

folder = dbutils.widgets.get("Folder")
if folder == "":
    raise Exception("Folder missing")

or to get spark settings you can use:

spark.conf.get("my_property")

Learn more about them here - https://docs.databricks.com/notebooks/widgets.html

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @User16187108406241337282! My name is Kaniz, and I'm the technical moderator here. Great to meet you, and thanks for your question! Let's see if your peers on the Forum have an answer to your questions first. Or else I will follow up shortly with a response.

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.