LiveView Expression Language

LiveView server supports a SQL-like query language with extensions for handling streaming data. The LiveView query language has three parts:

LiveView query language incorporates only simple functions from the StreamBase expression language functions that support these data types. A function must take only the supported types as input and return only the supported types as output. Note that StreamBase aggregate functions are not supported in LiveView.

Note

Functions that take capture, list, NamedSchema, and tuple datatypes are not supported for use in LiveView queries or configurations. To use these functions with LiveView, configure an EventFlow application that outputs a LiveView-supported data type and publish the output in a LiveView table.

Datatype Support in LiveView Tables

LiveView query language uses the capabilities of the simple functions from StreamBase CEP expression language for supported LiveView data types. The data types supported for table fields in LiveView are shown in the following table:

Data Type Description
blob Binary data in a tuple. They are designed to efficiently process large data objects such as video frames or other multimedia data, although performance might diminish with larger sizes. The blob data type is not supported for table indices.
bool Boolean true or false.
double 8-byte numeric.
int 4-byte numeric
long 8-byte integer.
string Field of text characters
timestamp Absolute or interval timestamp.

Data Aggregation

LiveView's simple functions have no state and take in one tuple value and emit one value. LiveView also has aggregate functions. The aggregate functions do have state; they allow you to return one value from a group of input tuples. The updated aggregate values are emitted as data streams. There are two ways to configure aggregation in LiveView:

  • Dynamic aggregation uses ad hoc aggregate functions expressed via the LiveView API from a client connection query. Use dynamic aggregation for the following examples:

    • You are doing data mining on a new set of data streams and you need to figure out which aggregate functions provide the most valuable insights.

    • You want to use special LiveView query structures, such as time windows, to limit the query's scope.

  • Static aggregation functions are statically defined at authoring time. Use static aggregation when you have a well-defined set aggregates shared among a number of users. For example:

    • You have a large team who are viewing and analyzing the same data using the same aggregates. In this case, having several users issuing similar aggregate queries simultaneously against the same LiveView server instance may have adverse effects on server performance.

    • You want to use additional LiveView table-based features, such as alerting, on your aggregated data. In this case, you should configure an aggregate table and then configure an alert against that table.

LiveView Dynamic Aggregation Functions

LiveView dynamic (query-based) aggregation supports the following aggregate functions:

LiveView Static Aggregation Functions

LiveView static (table-based) aggregation supports the following aggregate functions: