cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Asset bundle yml factorization

erigaud
Honored Contributor

Hello,

I have a project using asset bundle in which I have several jobs using roughly the same job definition (tags and job clusters definitions are always the same) 

Is there a way to put everything in common in a yml file and reuse that in each individual yml file of each job ? 

Thank you ! 

 

3 REPLIES 3

Kaniz_Fatma
Community Manager
Community Manager

Hi @erigaudYAML supports a feature called anchors and aliases, which allows you to define a set of common properties once and reuse them in multiple places. If your YAML processor supports it, you might also consider using YAML includes. This approach allows you to include an external YAML file directly into another. 

 If you need further assistance or have any specific questions, feel free to ask!

erigaud
Honored Contributor

Hello @Kaniz_Fatma 
I want to use complex variables but I would like to define all my variables in a separate file, I do not want to have them declared in the databricks.yml.

Is there a way to do that ? Thank you 

Witold
Contributor

@erigaud 

What might work, I actually never tried it by myself so far, is this:

Define your complex variables in a separate yaml file (complex variables are supported since v0.222.0), import this file using include, and reference these variables accordingly.

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