Documentation Index
Fetch the complete documentation index at: https://mage-staging.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Mage allows users to reference variables specific to your pipeline or project. These variables are accessible throughout your dbt profiles, and pipelines by using the following syntax.| Syntax | Description | Example |
|---|---|---|
{{ env_var('...') }} | Get from environment variables. | {{ env_var('ENV') }} |
{{ variables('...') }} | Get from runtime variables. | {{ variables('execution_date') }} |
Variable interpolation examples
dbt models
dbt profiles
dbt targets

postgres_{{ env_var('ENV') }}.
| Environment | Key | Example string | Result |
|---|---|---|---|
prod | ENV | postgres_{{ env_var('ENV') }} | postgres_prod |
dev | ENV | postgres_{{ env_var('ENV') }} | postgres_dev |