-
Notifications
You must be signed in to change notification settings - Fork 8
Description
In short:
It should be possible to reference workspace variables in either the substitution files directly or via the databricks file.
Proposal:
In many projects, schemas in development has a unique prefix to enable parallel development.
To enable references to unique schemas for each developer, it should not be necessary to change variables manually in the substitution files.
It should be possible to make a reference directly to workspace variables in the substitution file i.e. ${workspace.current_user.id}.
Or, by referencing variables in the databricks file from the substitution file, i.e ${var.dev_prefix} in substitutions, and dev_prefix dev_${workspace.current_user.id} in the databricks file.
Example:
Referencing a variable in databricks.yml:
substitutions/dev.yaml
dev:
raw_schema: ${var.dev_prefix}raw
bronze_schema: ${var.dev_prefix}bronzedatabricks.yml
variables:
dev_prefix:
description: "Prefix for development environment schemas"
default: ''
targets:
dev:
variables:
dev_prefix: dev_${workspace.current_user.id}_OR
Referencing workspace variables directly:
substitutions/dev.yaml
dev:
raw_schema: dev_${workspace.current_user.id}_raw
bronze_schema: dev_${workspace.current_user.id}_bronzeBoth result in
raw_schema = "dev_13829_raw"
bronze_schema = "dev_13829_bronze"