row_rank_min
Returns the minimum rank of a column in a serialized row set: each row in a run of equal column values gets the 1-based position of the first row in that run, so ranks jump by the run length. An optional restart argument resets the rank when true. 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
row_rank_min(term, restart)Parameters
Prop
Type
Returns: long
Examples
Example 1
datatable(weapon:string)[
"axe",
"axe",
"sword",
"spear"
]
| sort by weapon asc
| extend rank = row_rank_min(weapon)| weapon (string) | rank (long) |
|---|---|
| axe | 1 |
| axe | 1 |
| spear | 3 |
| sword | 4 |
row_rank_dense
Returns the dense rank of a column in a serialized row set: the rank starts at 1 and increments by 1 each time the column value changes, with no gaps. An optional restart argument resets the rank to 1 when true. 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.
row_window_session
Assigns a session window to each row of a serialized row set based on a datetime column. A new session starts when the value is more than max_distance_from_first beyond the session start, or more than max_distance_between_neighbors beyond the previous value; the function returns the session's start datetime. 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.