> 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

Queries provide a standardized form of defining data systems queries, which can easily be migrated between systems.

![Query UI](https://1659095931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcnDk3J1AzTgg2NFrGPlh%2Fuploads%2F8jpl3zKe0F8t8kX5jF0U%2FUI_Query.png?alt=media\&token=863b512d-bb23-4dc3-ad01-590c7623a536)

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](https://docs.rierino.com/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](https://docs.rierino.com/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 by asking a question.

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

```
GET https://docs.rierino.com/configuration/queries.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.
