dbx icon indicating copy to clipboard operation
dbx copied to clipboard

[DOCS] Add documentation on how to work with environment variables

Open renardeinside opened this issue 3 years ago • 2 comments

Add documentation piece on how to work with environment variables in dbx execute and in job definitions.

renardeinside avatar Jul 26 '22 14:07 renardeinside

is this possible?

vitoravancini avatar Jan 30 '23 21:01 vitoravancini

hi @vitoravancini , yes, but a bit cumbersome. In short, there are two pieces into it:

  1. providing secrets
  2. providing non-secret values

As for secrets, you should use the Databricks Secrets approach and not rely on dbx.

As for non-secret values, you can do the following:

  1. Add a file with env variables in dotenv format to your package, as described here
  2. Load this file by path using python-dotenv package.

This is a very short summary, detailed docs are yet to be written.

renardeinside avatar Jan 30 '23 21:01 renardeinside