series_fft
You can use series_fft when you want to analyze the frequency components of your data, detect periodic patterns, or perform spectral analysis. Typical applications include identifying seasonal patterns in logs, detecting anomalies in telemetry data, analyzing network traffic patterns, and performing signal processing on time series data.
Usage#
Syntax#
series_fft(x_real [, x_imaginary])Parameters#
| Parameter | Type | Description |
|---|---|---|
x_real |
dynamic | A numeric array representing the real component of the series to transform. |
x_imaginary |
dynamic | Optional: A dynamic array of real numeric values representing the imaginary component of the series. Only specify this if the input series contains complex numbers. |
Returns#
The function returns the complex FFT in two series. The first series for the real component and the second one for the imaginary component.
Example#
Use series_fft to identify periodic patterns in request durations, such as daily or hourly cycles in app performance.
Query
['sample-http-logs']
| summarize durations = make_list(req_duration_ms) by bin(_time, 1h)
| extend fft_analysis = series_fft(durations)Output
| durations | fft_analysis |
|---|---|
| 0.5440150626057182 | 20.661607812192038 |
| 0.4854750276771741 | -0.9608495167924037 |
List of related functions#
- series_ifft: Performs the inverse FFT to convert frequency domain data back to time domain. Use when you need to reconstruct the original signal from frequency components.
- series_fir: Applies a finite impulse response filter to a series. Use for signal filtering and noise reduction.
- series_cos: Returns the cosine of each element in an array. Use for trigonometric analysis of periodic patterns.
- series_sin: Returns the sine of each element in an array. Use for analyzing periodic components in signals.
- series_exp: Calculates the exponential of each element in an array. Use for exponential growth analysis instead of frequency analysis.
Other query languages#
Splunk SPL users
In Splunk SPL, FFT operations aren’t natively available and typically require external tools or complex workarounds. Most Splunk users rely on statistical functions and time-based aggregations for pattern analysis. In APL, series_fft provides direct access to frequency domain analysis, enabling sophisticated signal processing capabilities.
ANSI SQL users
ANSI SQL doesn’t provide FFT functionality. Database systems typically require specialized extensions or external libraries for frequency domain analysis. Most SQL users rely on window functions and statistical aggregations for time series analysis. In APL, series_fft brings advanced signal processing capabilities directly into the query language.