This page explains how to use the array_split function in APL.
array_split
function in APL splits an array into smaller subarrays based on specified split indices and packs the generated subarrays into a dynamic array. This function is useful when you want to partition data for analysis, batch processing, or distributing workloads across smaller units.
You can use array_split
to:
Splunk SPL users
mvzip
and mvfilter
, but there is no direct equivalent to array_split
. APL provides a more explicit approach for splitting arrays.ANSI SQL users
Parameter | Description | Type |
---|---|---|
array | The array to split. | Dynamic |
index | An integer or dynamic array of integers. These zero-based split indices indicate the location at which to split the array. | Integer or Dynamic |
events
array at index 2
into two subarrays for further processing.
events
array into three subarrays based on the indices [1,2]
.