elasticsearch/docs/reference/esql/source-commands/row.asciidoc
Abdon Pijpelink 76ab37b35d
[DOCS] Uniform formatting for ES|QL commands (#101728)
* Source commands

* Missing word

* Processing commands

* Apply suggestions from code review

Co-authored-by: Alexander Spies <alexander.spies@elastic.co>

* Review feedback

* Add sort detail for mv

* More review feedback

---------

Co-authored-by: Alexander Spies <alexander.spies@elastic.co>
2023-11-06 08:42:13 +01:00

49 lines
882 B
Text

[discrete]
[[esql-row]]
=== `ROW`
**Syntax**
[source,esql]
----
ROW column1 = value1[, ..., columnN = valueN]
----
*Parameters*
`columnX`::
The column name.
`valueX`::
The value for the column. Can be a literal, an expression, or a
<<esql-functions,function>>.
*Description*
The `ROW` source command produces a row with one or more columns with values
that you specify. This can be useful for testing.
*Examples*
[source.merge.styled,esql]
----
include::{esql-specs}/row.csv-spec[tag=example]
----
[%header.monospaced.styled,format=dsv,separator=|]
|===
include::{esql-specs}/row.csv-spec[tag=example-result]
|===
Use square brackets to create multi-value columns:
[source,esql]
----
include::{esql-specs}/row.csv-spec[tag=multivalue]
----
`ROW` supports the use of <<esql-functions,functions>>:
[source,esql]
----
include::{esql-specs}/row.csv-spec[tag=function]
----