timeSeriesRateToGrid
Aggregate function that takes time series data as pairs of timestamps and values and calculates PromQL-like rate from this data on a regular time grid described by start timestamp, end timestamp and step. For each point on the grid the samples for calculating rate
are considered within the specified time window.
Parameters:
start timestamp
- グリッドの開始を指定します。end timestamp
- グリッドの終了を指定します。grid step
- グリッドのステップを秒で指定します。staleness
- 考慮されるサンプルの最大「劣化」を秒で指定します。劣化ウィンドウは左が開いていて右が閉じている区間です。
Arguments:
timestamp
- サンプルのタイムスタンプvalue
-timestamp
に対応する時系列の値
Return value:
指定されたグリッド上の rate
値を Array(Nullable(Float64))
として返します。返される配列は、各タイムグリッドポイントのための1つの値を含んでいます。その値は、特定のグリッドポイントに対してレート値を計算するのに十分なサンプルがウィンドウ内にない場合は NULL です。
Example:
以下のクエリは、グリッド [90, 105, 120, 135, 150, 165, 180, 195, 210] の rate
値を計算します。
Response:
また、タイムスタンプと値の複数のサンプルを同じサイズの配列として渡すことも可能です。配列引数を使用した同じクエリ:
注記
この関数は実験的です。allow_experimental_ts_to_grid_aggregate_function=true
を設定することで有効にします。