timeTable
The timeTable
method creates a time table that adds new rows at a specified interval. The resulting table has one date-time column, Timestamp
.
Syntax
timeTable(period)
timeTable(period, replayer)
timeTable(startTime, period)
timeTable(startTime, period, replayer)
timeTable(periodNanos)
timeTable(periodNanos, replayer)
timeTable(startTime, periodNanos)
timeTable(startTime, periodNanos, replayer)
timeTable(clock, startTime, periodNanos)
Parameters
Parameter | Type | Description |
---|---|---|
period | String | The time interval between new row additions. |
replayer | ReplayerInterface | Data replayer. |
startTime | DateTime | Start time for adding new rows. |
periodNanos | long | The time interval between new rows in nanoseconds. |
clock | Clock | The clock. |
Returns
A ticking time table that adds new rows at the specified interval.
Example
The following example creates a time table that adds one new row every second.
result = timeTable("PT00:00:01")
The following example creates a time table that starts two hours prior to its creation.
startTime = minus(now(), parseDuration("PT2H"))
source = timeTable(startTime, "PT1S")