v.25.8New Feature
TimeSeriesDerivToGrid and timeSeriesPredictLinearToGrid aggregate functions
timeSeriesDerivToGridandtimeSeriesPredictLinearToGridaggregate functions to re-sample data to a time grid defined by the specified start timestamp, end timestamp, and step; calculates PromQL-likederivandpredict_linear, respectively. #84328 (Stephen Chi).
Why it matters
These functions address the need to analyze and predict time series data by resampling it to a uniform time grid and applying derivative and linear prediction calculations similar to Prometheus's PromQL language. This allows users to perform advanced time series analysis directly within ClickHouse for monitoring and forecasting scenarios.How to use it
UsetimeSeriesDerivToGrid and timeSeriesPredictLinearToGrid as aggregate functions by providing the start timestamp, end timestamp, and step interval parameters to define the target time grid. They will then resample the data and apply the respective calculations automatically.