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

# Queries

![Query UI](/files/uz0nNhbOiFCSA59I5jz8)

Opening the **Query** screen from **Configuration** app menu or navigation bar, you will come across a visual query editor, allowing design of new queries.

{% embed url="<https://www.youtube.com/watch?v=ZcPnXyv9nqI>" %}

Queries are mainly used by [Query Managers](/devops/microservices/building-blocks/query-and-search-sources.md) in extracting specific data from different platforms.

Following attributes are used for all query types:

* **Name:** Descriptive name for the query.
* **Description:** Detailed description for the query.
* **Type:** Type of the query.
* **Status:** Whether the query is currently active or not.
* **Platform:** Target execution platform for the query.
* **From:** Main data source (e.g. table) for the query.
* **As:** Alias for the main data source.
* **Parameters:** Platform specific parameters for the query.
* **Inject:** Whether query should be injected with variables or not.
* **Required Variables:** List of mandatory variables for the query to execute (others will be considered optional and omitted if missing).

{% hint style="info" %}
It is possible to make any query filter optional based on a condition (such as type='1'), by adding a transformation step and removing/adding a conditional variable  (e.g. {type1: (type=='1' || null)}) and using this variable as a required variable.
{% endhint %}

{% hint style="info" %}
See [injecting variables](/devops/api-event-and-process-flows/injecting-variables.md) for creating dynamic queries using variables.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rierino.com/configuration/queries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
