---
title: "array_slice function in Strata | Oplema"
description: "Extract a section of a list or text by start and end positions, where 1 is the first position. Same as list_slice. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/array-slice"
updated: "2026-11-04"
---

# array\_slice

Extract a section of a list or text by start and end positions, where 1 is the first position. Negative positions count from the end.

Also available as list\_slice.

## Try an expression

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

### Expression

```
array_slice('DuckDB', 3, 4)
```

### Result

```
'ck'
```

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 | ck |

## Arguments and types

```
array_slice(list, begin, end, step)
```

**list**

Any value

**begin**

Any value

**end**

Any value

**step**

Number

Supported signatures (2)

```
array_slice(list: ANY, begin: ANY, end: ANY) → ANY
array_slice(list: ANY, begin: ANY, end: ANY, step: BIGINT) → ANY
```

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

[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.

](https://oplema.com/docs/strata/functions/array-extract)[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)[format

Fill {} placeholders in text with values, as in format('{} and {}', 'a', 1).

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

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

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