---
title: "struct_concat function in Strata | Oplema"
description: "Merge several structs into a single struct that holds all of their fields. Write it as struct_concat(s1, s2) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/struct-concat"
updated: "2026-11-04"
---

# struct\_concat

Merge several structs into one.

## Try an expression

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

### Expression

```
struct_concat(struct_pack(i := 4), struct_pack(s := 'string'))
```

### Result

```
'{'i': 4, 's': string}'
```

The expression returns `STRUCT(i INTEGER, s VARCHAR)`. 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 | {'i': 4, 's': string} |

## Arguments and types

```
struct_concat(...)
```

Supported signatures (1)

```
struct_concat(...: ANY) → STRUCT
```

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

## Related functions

[row

Create an unnamed struct from its arguments.

](https://oplema.com/docs/strata/functions/row)[struct\_contains

Check whether an unnamed struct contains a value.

](https://oplema.com/docs/strata/functions/struct-contains)[struct\_extract

Get one entry from a struct by name, or by position starting at 1 in an unnamed struct.

](https://oplema.com/docs/strata/functions/struct-extract)[struct\_extract\_at

Get one entry from a struct by position, starting at 1.

](https://oplema.com/docs/strata/functions/struct-extract-at)

[Browse structs](https://oplema.com/docs/strata/functions#structs) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/struct.html#struct_concatstructs)

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