Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 12:06 PM
The parameters are passed as widgets to the job. After defining the parameters in the job definition, With following code I was able to access the data associated with the parameter:
widget_names = ["loc1", "loc2", "loc3"] # Add all expected parameter names here
print("Parameters passed to the notebook:")
for name in widget_names:
try:
value = dbutils.widgets.get(name)
print(f"{name}: {value}")
except Exception as e:
print(f"{name}: Not defined (Error: {str(e)})")