Scalar FunctionsOther Functions
next
Returns the value of a column from a row at a given offset after the current row in a serialized row set.
A row set is serialized by the sort, top, top-hitters, or serialize operators; order-preserving operators (extend, project, where, ...) keep that property. Only valid in a serialized context.
Syntax
next(column, offset, default_value)Parameters
Prop
Type
Returns: dynamic
Examples
Example 1
datatable(value:long)[
1,
2,
3,
4
]
| sort by value asc
| extend next_value = next(value)| value (long) | next_value (long) |
|---|---|
| 1 | 2 |
| 2 | 3 |
| 3 | 4 |
| 4 | null |
Example 2
datatable(value:long)[
1,
2,
3,
4
]
| sort by value asc
| extend next_value = next(value, 2, 0)| value (long) | next_value (long) |
|---|---|
| 1 | 3 |
| 2 | 4 |
| 3 | 0 |
| 4 | 0 |