Substitutions¶
substitutions/<env>.yaml supplies the values LHP substitutes into ${...}
tokens when generating a pipeline for environment <env> (selected by
lhp generate --env <env>). Recognized top-level keys:
global: # tokens shared across every environment
<token>: <value>
<env>: # dev, staging, prod, ... — one block per environment
<token>: <value>
secrets: # secret-scope configuration
default_scope: <scope>
scopes:
<alias>: <databricks_scope>
See also
How-to guide: Reuse one flowgroup across environments.
Top-level keys¶
Key |
Type |
Description |
|---|---|---|
|
mapping |
Token map for one environment. The key matches the |
|
mapping |
Token map applied to every environment. A token also present in the active |
|
mapping |
Secret-scope configuration ( |
Token maps¶
Each <env> and global block maps token names to values. A name used in
a ${name} reference resolves to the value here. Values may be strings,
numbers, or booleans (coerced to strings); nested mappings and lists are
preserved for structured tokens.
Two reserved tokens are provided automatically and need not be declared:
Token |
Default |
Override |
|---|---|---|
|
The active |
|
|
The active |
|
global:
landing_volume: /Volumes/shared/landing
dev:
catalog: dev_catalog
bronze_schema: bronze
silver_schema: silver
prod:
catalog: prod_catalog
bronze_schema: bronze
silver_schema: silver
secrets¶
The top-level secrets block configures how ${secret:...} references
resolve. Both fields are optional.
Field |
Type |
Required |
Default |
Description |
|---|---|---|---|---|
|
string |
No |
— |
Scope used for the |
|
mapping |
No |
— |
Alias-to-scope map. An alias used in |
secrets:
default_scope: dev_secrets
scopes:
database_secrets: dev_db_secrets
storage_secrets: dev_azure_secrets
Token syntax¶
Syntax |
Name |
Defined in |
|---|---|---|
|
Local variable |
|
|
Template parameter |
|
|
Environment token |
|
|
Secret reference |
Resolved to a |
The bare {token} form (no $) is deprecated; use ${token}. Resolution
order across these forms is covered in the substitutions concept page.
variables:
entity: customer
actions:
- name: "load_%{entity}"
type: load
source:
type: delta
catalog: "${catalog}"
schema: "${bronze_schema}"
table: "%{entity}"
target: "v_%{entity}"
- name: load_jdbc
type: load
source:
type: jdbc
url: "jdbc:postgresql://host:5432/db"
user: "${secret:database_secrets/user}"
password: "${secret:database_secrets/password}"
driver: org.postgresql.Driver
table: public.customers
target: v_customers_raw