Widgets - Way to validate config parameters
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2021 01:47 PM
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
Labels:
- Labels:
-
Config
-
Widgets Api