cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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?

3 REPLIES 3

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

ramy
New Contributor II

@ashish577 Just an extension to this, can I deploy a job (not run) with different parameter values ?

something like databricks bundle deploy --params k=v

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

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group