to_string.asciidoc 584 B

12345678910111213141516171819202122232425
  1. [[esql-to_string]]
  2. === `TO_STRING`
  3. Converts a field into a string. For example:
  4. [source.merge.styled,esql]
  5. ----
  6. include::{esql-specs}/string.csv-spec[tag=to_string]
  7. ----
  8. [%header.monospaced.styled,format=dsv,separator=|]
  9. |===
  10. include::{esql-specs}/string.csv-spec[tag=to_string-result]
  11. |===
  12. It also works fine on multivalued fields:
  13. [source.merge.styled,esql]
  14. ----
  15. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue]
  16. ----
  17. [%header.monospaced.styled,format=dsv,separator=|]
  18. |===
  19. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue-result]
  20. |===
  21. Alias: TO_STR