Dropdown for parameters in a job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 09:09 AM
I want to be able to denote the type of run from a predetermined list of values that a user can choose from when kicking off a run using different parameters. Our team does standardized job runs on a weekly cadence but can have timeframes that changed depending on the month or if it is a one off run to test. I am wanting to change the behavior of the run depending on the type of run it is and want to have users choose from a list to reduce errors like misspellings. Is there a good option to do this inside of the job itself, rather than a notebook?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2022 02:30 AM
Hi @Coleman Milligan
Checking the old unanswered questions and stumbled across this.
You can do that using the databricks widgets.
dbutils.widgets.dropdown("state", "CA", ["CA", "IL", "MI", "NY", "OR", "VA"])
If this widget is not helping you in passing parameters, you can do a try catch in all the notebooks to check if the parameter value you are passing is actually in the list of strings you have.
Hope this helps.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2022 09:31 AM
Hi @Uma Maheswara Rao Desula , thank you for the reply.
I'm actually wondering if there is a way to do this within the job ui using the 'run with different parameters' functionality.
It would be the environment key that I'm wanting to restrict user inputs into a predetermined list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2024 04:04 AM
Hi @cmilligan , I have a similar requirement and would really be grateful if you could provide me with any information on how to fix this issue. Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 10:23 AM
I'm looking to this too. Wonder if there a way to make as a drop down for a job parameter
![](/skins/images/97567C72181EBE789E1F0FD869E4C89B/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/97567C72181EBE789E1F0FD869E4C89B/responsive_peak/images/icon_anonymous_message.png)