cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

databricks Asset Bundle

tejaswi24
New Contributor III


i have come accross a documentation on asset bundles long back whcih states that when you type
databricks bundle init
it gives us option to choose a project type. But i see the below error when i do that i see the below error

tejaswi24_0-1727696851777.png

is there a way, i can take inputs from from commandline from template. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

gchandra
Databricks Employee
Databricks Employee

Create a conf.json with the values

{"project_name":"gc","include_notebook":"no","include_dlt":"no","include_python":"yes"}

 and call your DAB int this way

databricks bundle init default-python --config-file conf.json


~

View solution in original post

11 REPLIES 11

gchandra
Databricks Employee
Databricks Employee

tejaswi24
New Contributor III

@gchandra Thankyou for the response, but the default-python is not asking any input parameters. It is directly creating a sample my_project folder. I asked for a ay to customize inputs from user for choosing. Do you see a way to do this.

gchandra
Databricks Employee
Databricks Employee

Keeping Automation in mind, DAB helps you with custom Templates for customized Inputs. 

https://docs.databricks.com/en/dev-tools/bundles/templates.html#define-user-prompt-variables



~

tejaswi24
New Contributor III

@gchandra so does that mean there is no way that bundle support custom project name and project type when we do init

gchandra
Databricks Employee
Databricks Employee

you can use the --config-file parameter and pass all the values.

 



~

gchandra
Databricks Employee
Databricks Employee

Create a conf.json with the values

{"project_name":"gc","include_notebook":"no","include_dlt":"no","include_python":"yes"}

 and call your DAB int this way

databricks bundle init default-python --config-file conf.json


~

tejaswi24
New Contributor III

Thankyou @gchandra 
this solution worked. 

tejaswi24_0-1728900310379.png

 

pietern
Databricks Employee
Databricks Employee

Can you share which terminal you are using?

The command is supposed to provide you with an interactive selection menu. This does not appear if the terminal does not support it, so if you could share which one you're using, we might be able to replicate and investigate.

Thank you!

gchandra
Databricks Employee
Databricks Employee

I use the standard zsh terminal. When in doubt I use  --help to find out the options it has.



~

pietern
Databricks Employee
Databricks Employee

That's the shell running inside the terminal.

Can you tell the terminal type? E.g. Git BASH, cmd.exe, inside VS Code or else?

gchandra
Databricks Employee
Databricks Employee

Bash



~