> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetsilicon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL variables

> Reference variables that template the SQL in your models and make it reusable

* `${field}` - reference a field in the current model
* `${model.field}` - reference a field in another model
* `${TABLE}` - reference the current table's sql reference
* `${silicon.attributes.my_attr_1}` - a user attribute called `my_attr_1`
  * (optional) `ld` as an alias for `silicon`
  * (optional) `attribute` or `attr` as an alias for `attributes`
* `${silicon.user.<intrinsic_attribute>}` - reference an `intrinsic_attribute` of the current Silicon user
  * (optional) `ld` as an alias for `silicon`
  * available intrinsic user attributes:
    * `email`

> [!NOTE]
>
> **The user email attribute is only available when the email is verified.**
>
> This is a security measure to prevent users from creating/updating an account with any email they don't own and gain access to data they shouldn't see.
>
> If the user email is not verified you will get the following error:
>
> ```yaml theme={null}
> models:
>   - name: example
>     meta:
>       sql_filter: ${silicon.user.email} = 'example@meetsilicon.com'
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.