# Optional Queries

## Segment List Query

The **Segment List** query retrieves all segments within a given dataset.

### **Input Parameter**

Your query should support the following:

* **`dataset`** *(Required)* – A key-value pair for each metadata key checked in the dataset filter. Used in queries as `{{ dataset.id }}`.

### **Expected Output**

Each segment should be represented as a row containing:

* **`id`** *(Required)* – The unique identifier of the segment.
* **`label`** *(Required)* – A descriptive label for the segment.
* **`start`** *(Required)* – The timestamp of the first data point in the segment in nanoseconds.
* **`stop`** *(Required)* – The timestamp of the last data point in the segment in nanoseconds.
* **Additional metadata fields** *(Optional)* – Any relevant metadata attributes.

<figure><img src="/files/qdWyjlmtsYTWwZODPFlj" alt=""><figcaption></figcaption></figure>

## Other Optional Queries

In addition to the core queries, Marple supports several optional queries for improved performance and functionality:

* **Time Series Batch** – Retrieves data for multiple signals within a time range, with optional subsampling.
* **Cursor Values** – Fetches signal values at a specific timestamp, useful for scatter plots and maps.
* **Cursor Statistics** – Computes min, max, and mean values within a time range.
* **Signal Table** – Joins multiple signals into a single table with a common timestamp column.
* **Sandbox Signal** – Derives a new signal from existing ones using a formula.
* **Sandbox Preview** – Previews the results of a derived signal before applying it.

<figure><img src="/files/iWXkTtcvEPKLCAf9eVXX" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.marpledata.com/docs/marple-insight/setup-and-configuration/data-connection/connection-configuration/optional-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
