Time-Based Dimension Options

In the Aggregate operator Dimensions tab you can open the Edit Dimension dialog to add, edit, or remove dimensions from the Aggregate operator. With a time-based dimension, a new window will be managed and evaluated based on the passage of time. For example, a tuple containing the aggregate results may be emitted and the window closed when a specified time has elapsed, followed by the arrival of a new tuple.

The following table describes the options available in the Edit Dimension dialog for time-based dimensions.

TYPE = TIME

Category Options and Meaning
Opening policy: Select one of these options:
  • Do not open window based on this dimension: If selected, this dimension cannot cause the opening of a new window for the Aggregate.

  • Open per:

    • Advance: The amount in seconds by which to advance the window. Think of this setting as a "slider" for multiple windows.

    • Offset: A value by which to increment the start of windows. Windows will start at the offset plus positive integer multiples of the Advance. By default, the value of offset is 0.

      To understand offsets, consider a time-based dimension where the window size is 1 hour (3600 seconds). With no offset, windows advance by multiples of the window advance. So with an advance of 3600 we expect to see windows at exact hourly intervals, like 8:00, 9:00, 10:00, and so on. But suppose you want windows to start at fifteen minutes past the hour. If you set the offset to 900 seconds, the preceding window start times would change to 8:15, 9:15, 10:15, and so on.

Window size: Select one of these options:
  • Do not close window based on this dimension: If selected, this dimension cannot cause the closing of a new window for the Aggregate. If a new window is never opened, and Do not close... is selected, this creates an infinite sized window that never closes (for the life of the StreamBase Server).

  • Close and emit after [number] seconds: If selected, sets the number of seconds the window will remain open. When the number of seconds elapses, the window closes and an aggregate tuple is emitted.

Emission policy: Select one of these options:
  • No intermediate emissions based on this dimension: If selected, this dimension does not force an immediate emission of a results tuple (after applying the function's calculation to the tuples in the window).

  • Intermediate emission every [number] seconds: If selected, allows tuples to be emitted before the window closes. For example, one could emit a tuple every second during the 30-second window, instead of waiting for the window to close.


Back to Top ^