Secrets
Module for retrieving secrets from DataBricks Scopes.
Secrets are stored as SecretContext and can be accessed accordingly.
See DataBricksSecret for more information.
koheesio.integrations.spark.databricks.secrets.DataBricksSecret #
Retrieve secrets from DataBricks secret scope and wrap them into Context class for easy access. All secrets are stored under the "secret" root and "parent". "Parent" either derived from the secure scope by replacing "/" and "-", or manually provided by the user. Secrets are wrapped into the pydantic.SecretStr.
Examples:
context = {"secrets": {"parent": {"webhook": SecretStr("**********"), "description": SecretStr("**********")}}}
Values can be decoded like this:
or if working with dictionary is preferable: