> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Array

> Use the Sigma Array function to return an array containing specified values.

The **Array** function returns an array containing specified values.

> **Info**
>
> This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```sigma
Array([values])
```

Function arguments:

|            |                                                                                                                                                                                           |
| :--------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **values** | (Optional) Comma-separated values used to construct the array.Values can include a variety of input, including integers, strings, boolean values, columns, and results of function calls. |

> **Info**
>
> The **Array** function supports indexing using a zero-based indexing system. To retrieve a value in the array based on its position, append the index in square brackets directly following the function call. For a demonstration, see [Example 3](#example-3).

## Examples

### Example 1

```sigma
Array(1, 2, 3)
```

Returns the array `[1,2,3]` as [variant data](/docs/data-types-and-formats#variant).

### Example 2

```sigma
Array(1, "Hello", Today())
```

Returns the array `[1,"Hello","2024-03-14 00:00:00.000 Z"]` when the current date is March 14, 2024.

### Example 3

```sigma
Array("red", "orange", "yellow")[1]
```

Because the array has an index range from 0 to 2, `[1]` instructs Sigma to access the value in the second position, which returns `"orange"`.