cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Variables in databricks.yml "include:" - Asset Bundles

nickneoners
New Contributor II

HI,

We've got an app that we deploy to multiple customers workspaces. 

We're looking to transition to asset bundles. We would like to structure our resources like:

 

 

-src/
-resources/
|-- customer_1/
   |-- job_1
   |-- job_2
|-- customer_2/
   |-- job_3
   |-- job_4
|-- customer_3/
   |-- job_5
   |-- job_6
- databricks.yml

 

 

so each customer only gets their specific workflows.

In `databricks.yml` would love to do:

 

 

bundle:
  name: my_app

include: 
  - resources/${bundle.target}/*.yml

 

 

but unfortunately it seems you can't pass any variables into the `include` block.

Any ideas?

Thanks!

2 REPLIES 2

nickneoners
New Contributor II

Just to add to the above, we've got about 30-40 jobs per customer, so we don't want to define these jobs in the `databricks.yml`, which seems to be the only way to navigate around this issue

p4pratikjain
Contributor

Interesting use case!! Ideally having seperate bundle for each customer seems like a clean solution. But if you dont want that then - 
You can just include all the yaml files in databricks.yml with 

include: 
  - resources/*/*.yml

 Inside the yaml files handle different workspaces under different targets ? target is a top level node which is merged so you can have 'customer_1', 'customer_2' as different targets ?

This is not the intended use of targets but I guess this will solve the ask.

Pratik Jain

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