
Answer-first summary for fast verification
Answer: dbutils.widgets
The `dbutils.widgets` utility is designed for adding and retrieving parameters in notebooks. For instance, to add a parameter named 'param1' with a default value, you would use: ```python dbutils.widgets.text("param1", "default") param1 = dbutils.widgets.get("param1") ``` Parameters defined in this manner can be passed from Databricks Jobs by specifying them in the Parameters section of the task configuration. This functionality is crucial for dynamic notebook execution based on job parameters. Reference: [Databricks Widgets Documentation](https://docs.databricks.com/notebooks/widgets.html)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A data engineer needs to access multiple parameters passed from a Databricks Job to a notebook, with each parameter's key and value already set in the job configurations. Which utility should they use within the notebook to retrieve these parameters?
A
dbutils.secrets
B
dbutils.library
C
dbutils.fs
D
dbutils.notebook
E
dbutils.widgets
No comments yet.