Skip to content

Commit eda0085

Browse files
authored
Docs: add gateway variables to jinja macros concepts doc (#3210)
1 parent e099cbb commit eda0085

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/concepts/macros/jinja_macros.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ WHERE some_value = {{ var('missing_var', 0) }};
9090
JINJA_END;
9191
```
9292

93+
### Gateway variables
94+
95+
Like global variables, gateway variables are defined in the project configuration file. However, they are specified in a specific gateway's `variables` key. Learn more about defining gateway variables in the [SQLMesh macros documentation](./sqlmesh_macros.md#gateway-variables).
96+
97+
Access gateway variables in models using the same methods as [global variables](#global-variables).
98+
99+
Gateway-specific variable values take precedence over variables with the same name specified in the configuration file's root `variables` key.
100+
93101
### Local variables
94102

95103
Define your own variables with the Jinja statement `{% set ... %}`. For example, we could specify the name of the `num_orders` column in the `sqlmesh_example.full_model` like this:

0 commit comments

Comments
 (0)