---
title: "array_extract function in Strata | Oplema"
description: "Get one item from a list or one character from text by position, where 1 is the first. For example, array_extract('DuckDB', 2) returns 'u'."
url: "https://oplema.com/docs/strata/functions/array-extract"
updated: "2026-11-04"
---

# array\_extract

Get one item from a list or one character from text by position, where 1 is the first. For a struct, choose a field by name, or by position in an unnamed struct.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
array_extract('DuckDB', 2)
```

### Result

```
'u'
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | u |

## Arguments and types

```
array_extract(value, position)
```

**string**

Text

**index**

Number

**struct**

Struct

**entry**

Text

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[substring

Extract part of text, starting at a character position where 1 is the first character. Without a length, it continues to the end of the text.

](https://oplema.com/docs/strata/functions/substring)[substring\_grapheme

Extracts substring starting from grapheme clusters start up to the end of the string. If optional argument length is set, extracts a substring of length grapheme clusters instead. Note that a start value of 1 refers to the first character of the string.

](https://oplema.com/docs/strata/functions/substring-grapheme)[ilike\_escape

Check whether text matches a LIKE pattern, ignoring uppercase and lowercase. The escape character lets the pattern search for a literal % or \_.

](https://oplema.com/docs/strata/functions/ilike-escape)[levenshtein

Count the fewest character insertions, deletions and substitutions needed to turn one string into another. Uppercase and lowercase letters count as different.

](https://oplema.com/docs/strata/functions/levenshtein)

[Browse lists & arrays](https://oplema.com/docs/strata/functions#lists-&-arrays) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#array_extractstring-index)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
