row.asciidoc 949 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. [discrete]
  2. [[esql-row]]
  3. === `ROW`
  4. The `ROW` source command produces a row with one or more columns with values
  5. that you specify. This can be useful for testing.
  6. **Syntax**
  7. [source,esql]
  8. ----
  9. ROW column1 = value1[, ..., columnN = valueN]
  10. ----
  11. *Parameters*
  12. `columnX`::
  13. The column name.
  14. In case of duplicate column names, only the rightmost duplicate creates a column.
  15. `valueX`::
  16. The value for the column. Can be a literal, an expression, or a
  17. <<esql-functions,function>>.
  18. *Examples*
  19. [source.merge.styled,esql]
  20. ----
  21. include::{esql-specs}/row.csv-spec[tag=example]
  22. ----
  23. [%header.monospaced.styled,format=dsv,separator=|]
  24. |===
  25. include::{esql-specs}/row.csv-spec[tag=example-result]
  26. |===
  27. Use square brackets to create multi-value columns:
  28. [source,esql]
  29. ----
  30. include::{esql-specs}/row.csv-spec[tag=multivalue]
  31. ----
  32. `ROW` supports the use of <<esql-functions,functions>>:
  33. [source,esql]
  34. ----
  35. include::{esql-specs}/row.csv-spec[tag=function]
  36. ----