2023-10-17 23:36:14 +08:00
|
|
|
[discrete]
|
2023-05-30 19:58:33 +08:00
|
|
|
[[esql-row]]
|
|
|
|
=== `ROW`
|
|
|
|
|
|
|
|
The `ROW` source command produces a row with one or more columns with values
|
|
|
|
that you specify. This can be useful for testing.
|
|
|
|
|
2023-06-12 22:37:45 +08:00
|
|
|
[source.merge.styled,esql]
|
2023-05-30 19:58:33 +08:00
|
|
|
----
|
|
|
|
include::{esql-specs}/row.csv-spec[tag=example]
|
|
|
|
----
|
2023-06-12 22:37:45 +08:00
|
|
|
[%header.monospaced.styled,format=dsv,separator=|]
|
2023-05-30 19:58:33 +08:00
|
|
|
|===
|
|
|
|
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]
|
|
|
|
----
|