Filtering Data in a Viewer

A description of how to filter data in a viewer, and specify filter columns and filter expressions.

Display

To filter the display in a viewer, enter a string into the Show only box at the bottom of the viewer. The viewer display is limited to rows that contain the specified string in any column, regardless of data type. Clear the display filter by deleting the string in the text box or by clicking the red x to the right of the box. Note that this feature only affects the display, not the contents of the stream or window.

Subscription

You can restrict the rows reaching the stream or window viewer by specifying filter columns, a filter expression, or both.

Filter Columns

If you are viewing an output stream or master window for which the FILTERCOLUMNS property has been set, you can specify parameters for the URI that limit the subscription to rows matching the specified filter values. For more information about FILTERCOLUMNS, see "CREATE STREAM Statement" and "CREATE WINDOW Statement" in the Sybase CEP CCL Reference.

To use this feature, follow these steps:

  1. Enter a comma-separated list of values in the Filter Columns box in the viewer. The values must be in the order specified by the FILTERCOLUMNS property of the output stream.
  2. Click the Reconnect button to the right of the URI. Sybase CEP Studio reconnects to the stream, passing the filter values as query string parameters. The viewer now displays only those rows with columns containing the specified values.

Filter Expression

Enter an expression into the Filter Expression box to limit the subscription to those rows for which the specified expression evaluates as True, even if the stream or master window does not have the FILTERCOLUMNS property set.

Any standard CCL Boolean scalar expression can be specified, but it cannot include any of the following:


  • Aggregator functions, such as SUM() or COUNT().

  • Stateful operators like PREV().

  • FIRST / LAST / INDEX operators.

  • CCL variable references.

  • GETTIMESTAMP().
  • GET__COLUMNBYNAME().
  • XMLPATTERNMATCH().
  • Functions used within XMLTABLE().

However, you can include user-defined scalar functions and the zero-argument variant of GETTIMESTAMP(). For information, see the Sybase CEP CCL Reference Guide.

You can also specify filter column values and/or a filter expression when you open a new viewer by clicking View Stream on the Debug menu.

Note that these features filter rows before Sybase CEP Studio displays them in the viewer, but the filter only applies to the viewer and does not affect any other component of your project.