ES|QL MV_EXPAND command
Serverless Stack
The MV_EXPAND processing command expands multivalued columns into one row per
value, duplicating other columns.
Syntax
MV_EXPAND column
Parameters
column- The multivalued column to expand.
Warning
The output rows produced by MV_EXPAND can be in any order and may not respect
preceding SORTs. To guarantee a certain ordering, place a SORT after any
MV_EXPANDs.
Example
ROW a=[1,2,3], b="b", j=["a","b"]
| MV_EXPAND a
| a:integer | b:keyword | j:keyword |
|---|---|---|
| 1 | b | ["a", "b"] |
| 2 | b | ["a", "b"] |
| 3 | b | ["a", "b"] |