﻿---
title: ES|QL MV_ZIP function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/2791/reference/query-languages/esql/functions-operators/mv-functions/mv_zip
products:
  - Elasticsearch
---

# ES|QL MV_ZIP function
## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/2791/reference/query-languages/esql/images/functions/mv_zip.svg)


## Parameters

<definitions>
  <definition term="string1">
    Multivalue expression.
  </definition>
  <definition term="string2">
    Multivalue expression.
  </definition>
  <definition term="delim">
    Delimiter. Optional; if omitted, `,` is used as a default delimiter.
  </definition>
</definitions>


## Description

Combines the values from two multivalued fields with a delimiter that joins them together.

## Supported types


| string1 | string2 | delim   | result  |
|---------|---------|---------|---------|
| keyword | keyword | keyword | keyword |
| keyword | keyword | text    | keyword |
| keyword | keyword |         | keyword |
| keyword | text    | keyword | keyword |
| keyword | text    | text    | keyword |
| keyword | text    |         | keyword |
| text    | keyword | keyword | keyword |
| text    | keyword | text    | keyword |
| text    | keyword |         | keyword |
| text    | text    | keyword | keyword |
| text    | text    | text    | keyword |
| text    | text    |         | keyword |


## Example

```esql
ROW a = ["x", "y", "z"], b = ["1", "2"]
| EVAL c = mv_zip(a, b, "-")
| KEEP a, b, c
```


| a:keyword | b:keyword | c:keyword     |
|-----------|-----------|---------------|
| [x, y, z] | [1 ,2]    | [x-1, y-2, z] |