Placeholders let you inject environment-specific values into your Qlik app files at build time — without editing the files themselves.
Define key-value pairs once in .qopsconfig. QOps substitutes every occurrence of @{KEY} with the corresponding value when reading app files during QOps-Build, QOps-Pull, QOps-Release, and QOps-Reload.
Defining Placeholders in .qopsconfig
YAML format (recommended)
Placeholders:
ENV: production
DB_SERVER: my-db-server.example.com
TEAM: BI-Platform
Important:
Placeholders must be a mapping (key: value), not a list. Using - key: value syntax will cause a parse error.JSON format
{
"Placeholders": {
"ENV": "production",
"DB_SERVER": "my-db-server.example.com",
"TEAM": "BI-Platform"
}
}
Using Placeholders in App Files
Use the syntax @{KEY} anywhere in your app files:
Script.qvs
LOAD * FROM [lib://datafiles/@{ENV}_sales.qvd] (qvd);
Variables/MyVar.yaml
Name: vEnvironment
Definition: "@{ENV}"
App.yaml, Dimensions, Measures, Sheets, MasterObjects, GenericObjects, Stories, Bookmarks, Selections — all support @{KEY} substitution.
Overriding at Runtime
Pass -Placeholders on any supported cmdlet to override or extend config values. Cmdlet values take precedence over .qopsconfig.
# Override ENV for this run only
QOps-Build -Placeholders @{ ENV = "staging"; DB_SERVER = "staging-db" }
QOps-Release -Filter "MyApp" -Placeholders @{ ENV = "production" }
QOps-Pull -Placeholders @{ ENV = "dev" }
QOps-Reload -Placeholders @{ ENV = "staging" }
Supported Cmdlets
| Cmdlet | Supports -Placeholders |
|---|---|
QOps-Build |
Yes |
QOps-Pull |
Yes |
QOps-Release |
Yes |
QOps-Reload |
Yes |
Common Use Cases
Multi-environment pipelines
# .qopsconfig (dev)
Placeholders:
ENV: dev
API_URL: https://dev-api.company.com
# .qopsconfig (prod)
Placeholders:
ENV: prod
API_URL: https://api.company.com
Dynamic data connection paths
// Script.qvs
LOAD * FROM [@{DATA_ROOT}/@{YEAR}/sales.qvd] (qvd);
QOps-Build -Placeholders @{ DATA_ROOT = "lib://Archive"; YEAR = "2025" }
Notes
- Placeholder keys are case-sensitive
- If a key is not found in the Placeholders dictionary, the
@{KEY}token is left as-is (no error) - Placeholders are applied at read time, before QOps parses the YAML/JSON structure — so they work in any string value, including nested ones