series_greater_equals
function compares two numeric arrays element by element and returns a new array of Boolean values. Each element in the result is true
if the corresponding element in the first array is greater than or equal to the corresponding element in the second array, and false
otherwise.
You use this function when you want to perform threshold comparisons across two series of values, such as checking performance metrics against baselines, comparing observed values to expected ranges, or evaluating time-aligned logs and traces.
For users of other query languages
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
Splunk SPL users
In Splunk SPL, you typically perform comparisons on fields or with
eval
expressions rather than array-based functions. If you want to compare series of values, you usually use eval
with conditional expressions, but SPL does not provide direct array-to-array comparison. In APL, series_greater_equals
lets you apply the comparison element by element on arrays.ANSI SQL users
ANSI SQL users
ANSI SQL does not natively support array-to-array operations in the same way. You often need to
UNNEST
arrays or join on row numbers to compare values across two arrays. APL provides a direct function, series_greater_equals
, that simplifies these operations by applying the comparison across the entire array at once.Usage
Syntax
Parameters
Parameter | Type | Description |
---|---|---|
array1 | dynamic (array of numeric values) | The first input array. |
array2 | dynamic (array of numeric values) | The second input array. Must be the same length as array1 . |
Returns
A dynamic array of Boolean values where each element istrue
if array1[i] >= array2[i]
, and false
otherwise.
Use case examples
In log analysis, you can compare observed request durations against a threshold series to identify requests that are slower than expected.QueryRun in PlaygroundOutput
This query groups request durations by user ID, builds a list of durations, and checks each against the threshold series of 100 ms.
id | durations | threshold | exceeds |
---|---|---|---|
u123 | [120,80,150] | [100,100,100] | [true,false,true] |
List of related functions
- series_greater: Compares two arrays and returns
true
where the first array element is greater than the second. - series_less: Compares two arrays and returns
true
where the first array element is less than the second. - series_less_equals: Compares two arrays and returns
true
where the first array element is less than or equal to the second. - series_not_equals: Compares two arrays and returns
true
where elements are not equal.