From 48139ffab52f616bff6bdbd580670ed624fb4482 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 10 Oct 2025 18:46:11 +0200 Subject: [PATCH] contextual variables in sql scripts --- .../0_scripts_quickstart/5_sql_quickstart/index.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/getting_started/0_scripts_quickstart/5_sql_quickstart/index.mdx b/docs/getting_started/0_scripts_quickstart/5_sql_quickstart/index.mdx index 57f096751..2ce435db8 100644 --- a/docs/getting_started/0_scripts_quickstart/5_sql_quickstart/index.mdx +++ b/docs/getting_started/0_scripts_quickstart/5_sql_quickstart/index.mdx @@ -575,6 +575,14 @@ Database resource can be specified from the UI or directly within the script wit
You can then write your prepared statement. +## Contextual variables + +You can use [contextual variables](../../../core_concepts/47_environment_variables/index.mdx#contextual-variables) in your queries. They need to be wrapped in `%%` like this: + +```sql +SELECT '%%WM_WORKSPACE%%' +``` + ## Raw queries ### Safe interpolated arguments