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

Databricks asset bundles passing parameters using bundle run which are not declared

ashish577
New Contributor III

Hi,

We recently decided to move to databricks asset bundles, one scenario that we are dealing with is we have different parameters passed to the same job which are handled in the notebook. With bundles when I try to pass parameters at runtime(which are not declared anywhere) it throws error saying "variable not defined". I am using cli to call bundle run and trying to pass parameters using --var="<varname=value>". Is there anyway to pass ad-hoc parameters to bundle run like we could with api's?

2 REPLIES 2

ashish577
New Contributor III

Found out we can do it using --params=<comma sep key=value pairs>

However, job needs to have at least 1 param defined to accept parameters

HrushiM
New Contributor II

Following syntax can be used.

databricks bundle run -t ENV --params Param1=Value1,Param2=Value2 Job_Name

Job Definition Parameter may look like this.

HrushiM_0-1710430681259.png

 

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.