timeSeriesResampleToGridWithStaleness
Aggregate function that takes time series data as pairs of timestamps and values and re-samples this data to a regular time grid described by start timestamp, end timestamp and step. For each point on the grid the most recent (within the specified time window) sample is chosen.
Alias: timeSeriesLastToGrid.
Parameters:
start timestamp- グリッドの開始時刻を指定しますend timestamp- グリッドの終了時刻を指定しますgrid step- グリッドのステップ(秒単位)を指定しますstaleness window- 最近のサンプルの最大「古さ」(秒単位)を指定します
Arguments:
timestamp- サンプルのタイムスタンプvalue-timestampに対応する時系列の値
Return value:
指定されたグリッドに再サンプリングされた時系列の値を Array(Nullable(Float64)) として返します。返される配列は各時間グリッドポイントに対して1つの値を含みます。特定のグリッドポイントにサンプルがない場合、その値は NULL になります。
Example: 次のクエリは、各グリッドポイントで30秒より古くない値を選択することによって、時系列データをグリッド [90, 105, 120, 135, 150, 165, 180, 195, 210] に再サンプリングします:
Response:
また、同じサイズの配列としてタイムスタンプと値の複数のサンプルを渡すことも可能です。配列引数を使用した同じクエリ:
この関数は実験的です。allow_experimental_ts_to_grid_aggregate_function=true を設定して有効にしてください。