Contents
The basis of a LiveView project is the LiveView data table. StreamBase LiveView takes your streaming data and lets you view it as a continuously updating table. Data is streamed through LiveView data tables, which are in turn contained within LiveView projects. A single project must have at a minimum one table and may have many more.
LiveView data tables are similar to SQL tables in that they consist of table rows and columns. Table columns store simple types of data, like numbers, strings, or timestamps. The supported data types
A table row is a horizontal record of values that fit into each different table column. However, unlike static SQL tables, LiveView data tables are designed to show continuously updating data received from a data stream.
When you use a project to start LiveView Server, you bring streaming data into a LiveView table via a data stream. A data stream is a series of ordered tuples. LiveView data table configuration requires that the table's input stream is named DataOut.

Every time a table's DataOut stream sends a tuple, a row is published in the LiveView table.
Tables are required to have at least one tuple field designated as a primary key. The primary key identifies the table record. If the table's primary key contains a field or fields for which each entry is unique, the table will add a new row every time a new tuple arrives. If the table's primary key has nonunique entries, then the first arrival of a primary key value creates a new table row and successive arrivals of tuples with the same primary key value will update the row.
The configuration file for a LiveView data table has the following required parts:
-
<liveview-configuration> declares that this is an lvconf file. These tags contains the following namespace and schema attributes:
<liveview-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.streambase.com/schemas/lvconf/">
This field is automatically populated when you create an lvconf file from StreamBase Studio.
-
<data-table> is the first child of <liveview-configuration> and declares that this file configures a data-table. This is the most common configuration element. A data-table receives tuples from a StreamBase data stream and publishes the tuples as rows.
-
<fields> declares the table's fields.
-
<field> is a child of <fields>; it defines each field of the data-table. Required attributes are name and type.
-
The field name must start with a alphabetic character (upper- or lower-case) and may contain underscores (_) and numbers. Field names cannot use reserved words from StreamBase Expression language, StreamSQL, or LiveView reserved words.
-
Fields must be of one of the supported data types for LiveView.
-
-
<primary-key> lists fields in the table that make rows unique.
Most LiveView data tables will also have these parts configured:
-
<data-sources> declares one or more data-sources for a table.
-
<indices> specify table fields that are indexed. Indices are very useful for improving query performance.
The full list of available tags and their descriptions is available in the LiveView Graphical Configuration Reference.
A sample lvconf from the product's Hello LiveView sample is shown here:
<?xml version="1.0" encoding="UTF-8"?> <liveview-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.streambase.com/schemas/lvconf/"> <!-- This file configures our primary data table of ItemsSales which has sales information over time. Below, this configuration declares a StreamBase EventFlow application file as the data source, meaning that the application file will be streaming data to this table. --> <data-table id="ItemsSales" description="Live view of all items sold over time, quantity in stock and the last sold price" short-description="Sales transactions"> <fields> <field name="transactionID" type="long"></field> <field name="transactionTime" type="timestamp"></field> <field name="Item" type="string"></field> <field name="category" type="string"></field> <field name="quantityRemaining" type="int"></field> <field name="lastSoldPrice" type="double"></field> </fields> <primary-key> <field ref="transactionID" /> </primary-key> <!-- This declares that an output stream from our data source application (defined in ItemsDataSource.lvconf) feeds our table. This application is started as soon as all LiveView tables have loaded. --> <data-sources> <data-source> <application output-stream="DataOut" application-ref="ItemsSalesDataSource" /> </data-source> </data-sources> </data-table> </liveview-configuration>