cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Databricks CLI how to start a job and pass the parameters?

jim12321
New Contributor II

I try to start a job ID 85218616788189 and pass one parameters 'demo' in Windows Shell.

This works:

databricks jobs run-now 85218616788189 
 
If I try this one,
databricks jobs run-now --json '{"job_id":85218616788189,"notebook_params": {"demo":"parameter successful"}}'
jim12321_0-1710267172994.png
 
What is the right syntax? 
@CLI
 

 

2 REPLIES 2

VVS29
New Contributor II
New Contributor II

Hi Jim, I think the right syntax would be something like this:

databricks jobs run-now --job-id 85218616788189 --notebook-params '{"demo":"parameter successful"}'.

Let me know if that worked!

jim12321
New Contributor II

Thanks for your help. I think this syntax only works for Databricks CLI (Legacy). I am using the new CLI which doesn't support the syntax.

https://docs.databricks.com/en/dev-tools/cli/commands.html

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.