This page explains how to use the array_shift_right function in APL.
The array_shift_right
function in Axiom Processing Language (APL) shifts the elements of an array one position to the right. The last element of the array wraps around and becomes the first element. You can use this function to reorder elements, manage time-series data in circular arrays, or preprocess arrays for specific analytical needs.
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
Splunk SPL users
In Splunk SPL, similar functionality might be achieved using custom code to rotate array elements, as there is no direct equivalent to array_shift_right
. APL provides this functionality natively, making it easier to work with arrays directly.
ANSI SQL users
ANSI SQL does not have a built-in function for shifting arrays. In SQL, achieving this would involve user-defined functions or complex subqueries. In APL, array_shift_right
simplifies this operation significantly.
Parameter | Type | Description |
---|---|---|
array | array | The input array whose elements are shifted |
An array with its elements shifted one position to the right. The last element of the input array wraps around to the first position.
Reorganize span events in telemetry data for visualization or debugging.
Query
Output
The query rotates span events for better trace debugging.
This page explains how to use the array_shift_right function in APL.
The array_shift_right
function in Axiom Processing Language (APL) shifts the elements of an array one position to the right. The last element of the array wraps around and becomes the first element. You can use this function to reorder elements, manage time-series data in circular arrays, or preprocess arrays for specific analytical needs.
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.
Splunk SPL users
In Splunk SPL, similar functionality might be achieved using custom code to rotate array elements, as there is no direct equivalent to array_shift_right
. APL provides this functionality natively, making it easier to work with arrays directly.
ANSI SQL users
ANSI SQL does not have a built-in function for shifting arrays. In SQL, achieving this would involve user-defined functions or complex subqueries. In APL, array_shift_right
simplifies this operation significantly.
Parameter | Type | Description |
---|---|---|
array | array | The input array whose elements are shifted |
An array with its elements shifted one position to the right. The last element of the input array wraps around to the first position.
Reorganize span events in telemetry data for visualization or debugging.
Query
Output
The query rotates span events for better trace debugging.