Introduced in: v26.9.0
Aggregate function that checks whether time series data is present on the specified grid. For each point on the grid the function returns 1 if there is at least one sample within the specified time window, otherwise NULL.
:::note
This function is in private preview, enable it by setting enable_time_series_aggregate_functions=true.
:::
Syntax
timeSeriesPresentToGrid(start_timestamp, end_timestamp, grid_step, staleness)(timestamp, value)
timeSeriesPresentToGrid(start_timestamp, end_timestamp, grid_step, staleness)(samples)Arguments
timestamp— Timestamp of the sample. Can be individual values or arrays.UInt32orDateTimeorDateTime64orArray(UInt32)orArray(DateTime)orArray(DateTime64)value— Value of the time series corresponding to the timestamp. Can be individual values or arrays.Float*orArray(Float*)samples— Samples of the time series passed as an array of tuples(timestamp, value), where the tuple elements have the timestamp and value types listed above. An alternative to passing the timestamps and the values as two separate arguments.Array(Tuple(T1, T2))
Returned value
Returns 1 for each grid point whose window contains at least one sample, otherwise NULL. Array(Nullable(UInt8))