to_string.asciidoc 734 B

123456789101112131415161718192021222324252627282930313233
  1. [discrete]
  2. [[esql-to_string]]
  3. === `TO_STRING`
  4. [.text-center]
  5. image::esql/functions/signature/to_string.svg[Embedded,opts=inline]
  6. Converts a field into a string. For example:
  7. [source.merge.styled,esql]
  8. ----
  9. include::{esql-specs}/string.csv-spec[tag=to_string]
  10. ----
  11. [%header.monospaced.styled,format=dsv,separator=|]
  12. |===
  13. include::{esql-specs}/string.csv-spec[tag=to_string-result]
  14. |===
  15. It also works fine on multivalued fields:
  16. [source.merge.styled,esql]
  17. ----
  18. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue]
  19. ----
  20. [%header.monospaced.styled,format=dsv,separator=|]
  21. |===
  22. include::{esql-specs}/string.csv-spec[tag=to_string_multivalue-result]
  23. |===
  24. Alias: TO_STR
  25. Supported types:
  26. include::types/to_string.asciidoc[]