It's possible to set DAB script variables using environment variables but it would be cleaner to use the yaml defined variables.
Example (feels clunky):
databricks bundle run create_lakebase_schemas
# Schema Definitions for Lakebase
scripts:
create_lakebase_schemas:
content: databricks psql $LAKEBASE_INSTANCE -- -d $LAKEBASE_DATABASE -c 'CREATE SCHEMA my_schema;'
It would be great to be use ${var.lakebase_database} defined in databricks.yml
This currently spits out the following error:
We do not support the ${...} interpolation syntax in scripts because
it's ambiguous whether it's a variable reference or reference to an
environment variable.
v0.281.0