> For the complete documentation index, see [llms.txt](https://docs.zenlytic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenlytic.com/data-modeling/referenceable_attributes.md).

# Referenceable Attributes

Use user and query attributes inside SQL for dynamic filtering and query behavior.

Referenceable attributes are attributes that can be used in queries either on views or dimensions, dimension groups or measures.

The include all user attributes that you pass in via the API (in embedding) or user attributes you have on the user that you've assigned through the UI.

In addition to those user attributes, these are also default user attributes that will be present on the user or query without any additions on your part.

## Defaults

These are two objects you can interact with that are populated by default.

### User Attributes

The first is the `user_attributes` object. This object will include all the values you pass, and will additionally include:

`email`: The email for the user making the query, as defined in their Zenlytic account.

### Query Attributes

The second is the `query_attributes` object. This object will show attributes of the query that is being run, and will include:

`dimension_group`: This is the dimension group of the query (only applicable for fields that are of `field_type: dimension_group`). It will be the value of the dimension group (e.g. `raw`, `date`, `week`, `month_of_year`, etc)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zenlytic.com/data-modeling/referenceable_attributes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
