Configurations
When you open a SQL project, you can find Configuration under the ... ellipses menu in the project header.
Types
Configurations are variables that you can use in various gem fields. There are two types of configurations.
- Model configurations: Only accessible in a specific model.
- Project configurations: Accessible to any component within a specific project.
Syntax
The variable name and value should both be valid in Python. The way you reference these variables differ between model and project configurations. The table below shows some usage examples for each type of configuration.
Type | Python Syntax | SQL Syntax |
---|---|---|
Model | key | {{ key }} |
Project | var("key", "defaultvalue") | {{ var("key", "defaultvalue") }} |
Note that the defaultvalue
is optional for project configurations.