---
title: "list_resize function in Strata | Oplema"
description: "Resize a list to a given length, cutting extra values or padding with a value you choose. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/list-resize"
updated: "2026-11-04"
---

# list\_resize

Resize a list to the given size. New items take the given value, or a missing value if none is given.

Also available as array\_resize.

## Try an expression

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

### Expression

```
list_resize([1, 2, 3], 5, 0)
```

### Result

```
'[1, 2, 3, 0, 0]'
```

The expression returns `INTEGER[]`. Formula stores it as `VARCHAR` in this example. 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 | \[1, 2, 3, 0, 0\] |

## Arguments and types

```
list_resize(list, size[, value])
```

**list**

List

**size**

Any value

**value**

Any value

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

[list\_zip

Pair up items by position from two or more lists, returning a list of structs. Shorter lists are padded with missing values unless you set truncate, which stops at the shortest list.

](https://oplema.com/docs/strata/functions/list-zip)[array\_cosine\_distance

Computes the cosine distance between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.

](https://oplema.com/docs/strata/functions/array-cosine-distance)[array\_cosine\_similarity

Computes the cosine similarity between two arrays of the same size. The array elements can not be NULL. The arrays can have any size as long as the size is the same for both arguments.

](https://oplema.com/docs/strata/functions/array-cosine-similarity)[array\_cross\_product

Computes the cross product of two arrays of size 3. The array elements can not be NULL.

](https://oplema.com/docs/strata/functions/array-cross-product)

[Browse lists & arrays](https://oplema.com/docs/strata/functions#lists-&-arrays) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/list.html#list_resizelist-size-value)

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