This page explains how to use the array_rotate_right function in APL.
array_rotate_right
function in APL allows you to rotate the elements of an array to the right by a specified number of positions. This function is useful when you need to reorder data within arrays, either to shift recent events to the beginning, reorder log entries, or realign elements based on specific processing logic.
Splunk SPL users
array_rotate_right
function provides functionality similar to the use of mvindex
or specific SPL commands for reordering arrays. The rotation here shifts all elements by a set count to the right, maintaining their original order within the new positions.ANSI SQL users
array_rotate_right
function offers a straightforward way to accomplish this by specifying a rotation count, while SQL users typically require a more complex use of CASE
statements or custom functions to achieve the same.array
: An array to rotate.count
: An integer specifying the number of positions to rotate the array to the right.count
.