to_string.asciidoc 556 B

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