Skip to main content
Version: Java (Groovy)

TimeSeriesFilter

TimeSeriesFilter filters a table for the most recent N nanoseconds.

caution

TimeSeriesFilter must be used on a DateTime column.

Syntax

result = source.where(new TimeSeriesFilter(columnName, nanos))
result = source.where(new TimeSeriesFilter(columnName, period))

Parameters

ParameterTypeDescription
columnNameString

The name of the DateTime column to filter by.

nanoslong

How much time, in nanoseconds, to include in the window.

periodString

How much time to include in the window.

Returns

A new table that contains only the rows within the specified time window.

Examples

The following example creates a time table, and then applies TimeSeriesFilter so that it only contains rows from the last 10 seconds.

import io.deephaven.engine.table.impl.select.TimeSeriesFilter

source = timeTable("PT00:00:01")

result = source.where(new TimeSeriesFilter("Timestamp", "PT00:00:10"))