elasticsearch/docs/reference/esql/functions/mv_concat.asciidoc
Nik Everett 46f95a67b4
ESQL: More MV_* tests (#100564)
This adds more tests for some of the `MV_` functions and updates their
docs now that the railroad diagram and table generated by the tests
covers all of the types.
2023-10-24 16:55:17 -04:00

32 lines
841 B
Text

[discrete]
[[esql-mv_concat]]
=== `MV_CONCAT`
[.text-center]
image::esql/functions/signature/mv_concat.svg[Embedded,opts=inline]
Converts a multivalued string field into a single valued field containing the
concatenation of all values separated by a delimiter:
[source.merge.styled,esql]
----
include::{esql-specs}/string.csv-spec[tag=mv_concat]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/string.csv-spec[tag=mv_concat-result]
|===
If you want to concat non-string fields call <<esql-to_string>> on them first:
[source.merge.styled,esql]
----
include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string-result]
|===
Supported types:
include::types/mv_concat.asciidoc[]