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

best way to store config files in a Unity workspace (Scala/typesafe)

-werners-
Esteemed Contributor III

We use typesafe (scala) to read configuration values from hocon files.
When not using Unity, we read the configuration files from /dbfs/...  works fine.
However, with Unity, usage of dbfs is frowned upon.
So I started looking into alternatives.
And unfortunately, dbfs still seems the best and easiest solution.
Anyone that has a better option which I may have missed?

And no, porting all code to python is not an option 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

-werners-
Esteemed Contributor III

In the end we will continue to use dbfs.  Maybe in the future when volumes are supported by scala io we can re-evaluate, but for now dbfs seems the way to go.

View solution in original post

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @-werners-, When working with external configuration files on Databricks, consider using the Databricks CLI to securely store and manage your configuration values in environment variables.

You can use the Databricks CLI's secrets command to securely store and manage secret values such as passwords, keys, and tokens in your Databricks workspace. You can reference these private values in your Scala code as environment variables.

-werners-
Esteemed Contributor III

Hi Kaniz, thanks for the suggestion.
However in our case storing config values in env vars will be cumbersome.  We put all of our filters applied in notebooks in those config files, together with default selections for entities etc.
So they are not 'sensitive' values.
I tried using volumes, but unfortunately volumes do not (yet) support scala.io (although it would totally make sense to use volumes here).

-werners-
Esteemed Contributor III

In the end we will continue to use dbfs.  Maybe in the future when volumes are supported by scala io we can re-evaluate, but for now dbfs seems the way to go.

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.