mv_concat.asciidoc 703 B

1234567891011121314151617181920212223242526
  1. [discrete]
  2. [[esql-mv_concat]]
  3. === `MV_CONCAT`
  4. Converts a multivalued string field into a single valued field containing the
  5. concatenation of all values separated by a delimiter:
  6. [source.merge.styled,esql]
  7. ----
  8. include::{esql-specs}/string.csv-spec[tag=mv_concat]
  9. ----
  10. [%header.monospaced.styled,format=dsv,separator=|]
  11. |===
  12. include::{esql-specs}/string.csv-spec[tag=mv_concat-result]
  13. |===
  14. If you want to concat non-string fields call <<esql-to_string>> on them first:
  15. [source.merge.styled,esql]
  16. ----
  17. include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string]
  18. ----
  19. [%header.monospaced.styled,format=dsv,separator=|]
  20. |===
  21. include::{esql-specs}/string.csv-spec[tag=mv_concat-to_string-result]
  22. |===