Error: Cannot use legacy parameters because the job has job parameters configured.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:12 PM
I created a job which has two Job Parameters. How can I use Databricks CLI to pass different values to those parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:28 PM
Hi @jay971, How are you doing today?
To answer your question, To pass job parameters using Databricks CLI, create a JSON file that contains your job ID and parameters in the format expected by Databricks. Then, use the --json-file option in the CLI command to provide the parameters dynamically. This way, you can adjust the values for each run without changing the job itself. Also, make sure the job is set up to accept these parameters to avoid any issues during execution.
Give a try and let me know.
Regrads,
Brahma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:49 PM
Thanks for your reply, I got it working. The issue was that I was using the wrong key inside the inline JSON string. I just triggered the job.
I have a follow-up question: What is the best way to trigger the job with 10 different input parameters using the CLI? Also, my job is configured to use a job cluster. Will there be 10 different job clusters spun up? Am I correct?
Thanks Again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 09:57 PM - edited 09-05-2024 10:12 PM
The job ran but did not pick up the values from the CLI.