Contents
Use the LiveView Configuration File Editor to configure the Data Table lvconf file type. This lvconf type is created by both the Data Table wizard (which opens automatically after creating a new LiveView fragment project), and by the Data Source wizard, which creates a data table and an EventFlow application to feed into that table.
Specify the table's schema, either by reference to a named schema or by editing the schema grid directly.
Designate one or more primary keys, either by selecting an available field and clicking the arrow button, by dragging and dropping from left to right, or by double-clicking an available field's name.
Specify a schema by importing a named schema, and/or adding fields directly to the table below
Property | Type | Description |
---|---|---|
Interface/Application | drop‑down list, chooser | Path to the sbapp or sbint file from which to import the schema. The path is relative to the project root (where the top-level lvconf must reside). If you specify a simple file name, LiveView searches for the file on the current project's module search path. |
Schema | drop‑down list | The name of the schema within the specified sbapp or sbint file. |
To define your own schema:
-
Click the Plus sign to add fields.
-
Select a field type from the dropdown list.
-
Enter an optional description.
Define your data table options:
Property | Type | Description |
---|---|---|
Snapshot Concurrency | int | Defines the maximum number of snapshot queries (one per thread) within a partition that are executed at once. |
Snapshot Parallelism | int | Defines the number of table partitions and the number of parallel regions used to scan a table during the snapshot portion of a query. |
Publish Interval (ms) | int |
This setting applies to all table types, and is used to specify in
milliseconds the amount of delay before publishing data from the table.
This condition is known as conflation of data. Set this attribute to a
positive, non-zero integer ≥ 5 to specify conflation for this table. A
value below 5, including zero and all negative numbers, is forced equal to
5. Static aggregation tables have an internal setting that is the
equivalent of setting publish-interval-millis=1000 (1 second). For such
tables, you cannot disable conflation, but you can change the conflation
interval by setting publish-interval-millis to a different integer value.
For all other table types, specify a value for publish-interval-millis to
both enable conflation and to specify the conflation interval. To disable
conflation for non-aggregation tables, remove the publish-interval-millis
attribute entirely from your table’s lvconf entry.
Without conflation, data is published from a table as soon as it is received. With conflation enabled, all downstream components see conflated data, including alerts, clients built with the Java or .NET APIs, or another table in a transformation sequence. If an alert is set for a conflated table, be aware that it is possible for conditions that would otherwise trigger an alert to occur briefly during a conflation period; in this case, the trigger conditions are conflated away and the alert does not trigger. See the Data Conflation topic in the LiveView Reference Guide for further information. |
Table Space Reference | drop‑down list | A reference to a defined table-space. |
Row Delete Rule | string | An optional rule specifying a predicate that is evaluated against the data in any incoming insert or update. If the incoming data satisfies the predicate and a row with a matching primary key exists, then no update occurs and the row is deleted. If the incoming data satisfies the predicate and no row with a matching primary key exists, then no insert occurs. If the incoming data does not satisfy the predicate, then an insert or update occurs as normal. |
Group | string | Optional logical grouping for a table. |
Select an primary key from the Available Fields list and either double-click it or click arrow to move it to the Index Fields box.
Optionally, select a secondary index or click
to create one.Choose up to three data sources in any combination. For most applications, only one data source type is required.
Property | Type | Description |
---|---|---|
Table Reference | drop‑down list | A reference to a table from which aggregated data is received. |
Projection | string | The projection expression that is used to populate the fields of this aggregate table. For example, max(price) as MaxPrice, avg(price) as AvgPrice. |
Predicate | string | The predicate used to filter rows from the base table. That is, area=='US' AND price>100 when transactionTime between now()-minutes(1) and now(). |
Group By | string | The group names or aliases must be a primary key field of this table. By default, the base table has column names that match this table's primary keys and will be used as group by keys. |
Define Pivot Table | check box |
If selected, Group By becomes disabled. |
Property | Type | Description |
---|---|---|
Application Reference | drop‑down list | Reference to a defined application. |
Output Stream | string | A valid output stream of the application to receive data from. Application streams that are intended to send data to LiveView or receive data from LiveView must be marked public; that is, the stream property "Always expose Stream for Dequeue" or "Always expose Stream for Enqueue" must be set. |
Disable validation typecheck | check box | There are certain unusual situations where a start-up artifact from a preprocessing app is not available early in LiveView server start-up. In these rare cases, in order to allow LiveView to run, you can skip typechecking of the referenced preprocessing app by setting this attribute to false. The downside is that you will no longer receive compile-time typecheck warnings, and may get runtime exceptions if your configuration is wrong. If typechecking is enabled, the system attempts to coerce fields to be the correct type, such as converting an integer to a long, or filling in empty fields with null. |
Property | Type | Description |
---|---|---|
Application | drop‑down list, chooser | Used by the StreamBase interface generator to identify the transform. |
Table Reference | drop‑down list | A reference to the source table. |
Parameters set by this configuration | selector | Parameters for the StreamBase application. Select one from the available list. |
Available Module Parameters | string | Select the application parameters to be set by this configuration. The Available module parameters table shows all parameters defined in the currently selected application. Default values are shown in brackets, when defined. |
Disable validation typecheck | check box | There are certain unusual situations where a start-up artifact from a preprocessing app is not available early in LiveView server start-up. In these rare cases, in order to allow LiveView to run, you can skip typechecking of the referenced preprocessing app by setting this attribute to false. The downside is that you will no longer receive compile-time typecheck warnings, and may get runtime exceptions if your configuration is wrong. If typechecking is enabled, the system attempts to coerce fields to be the correct type, such as converting an integer to a long, or filling in empty fields with null. |
Allow Cycle | check box | Optional. Under normal circumstances, cycles in the configuration graph are not allowed. Under certain advanced cases it might be necessary to have a cycle in the graph. A simple example would be table A publishing to table B and table B publishing back to table A. If a scenario like this is required, a custom transform should be introduced and the “allow-cycle” attribute should be set to true. This setting should be made with great care. |
Use Snapshot Parallelism | check box | Optional. When a table is configured with snapshot-parallelism, setting this attribute to true pushes the processing of this transform into the same parallel region as snapshot processing. In general, performance should be better by running inside the parallel region. |
None = default. If you select Use preprocessor application, configure the following as needed.
Property | Type | Description |
---|---|---|
Application | drop‑down list, chooser | Filename of the StreamBase application. This file is located using the project's module search path. |
Disable validation typecheck | check box | There are certain unusual situations where a start-up artifact from a preprocessing app is not available early in LiveView server start-up. In these rare cases, in order to allow LiveView to run, you can skip typechecking of the referenced preprocessing app by setting this attribute to false. The downside is that you will no longer receive compile-time typecheck warnings, and may get runtime exceptions if your configuration is wrong. |
Parameters set by this configuration | click | Name-value pair property definitions. |
Available Module Parameters | N/A |
This table shows all parameters defined in the currently selected
application. Default values are shown in brackets, when defined.
To set a parameter value (or override its default), select a parameter and click the button or double click a parameter, then enter the desired value. |
Tables this preprocessor depends on | click | Since StreamBase applications can have container connections defined within them, it is possible to have a container connection from this application to another LiveView table. Explicitly stating these dependencies here allows LiveView to know about them such that LiveView will load tables in the proper order on startup. |
Optionally:
-
Add all available module parameters without defaults
-
Add all available module parameters
-
Add a parameter not yet defined by the application
Use the Retention Policy tab to define how long you want table data retained. Retention policies become especially relevant when dealing with large tables of streaming data and server memory is a consideration. When setting a retention policy, the current LiveView server time is compared with the timestamp field value, and that becomes the basis for whether a row is deleted.
Set one of the following Table Delete Rules:
- Elapsed Time Rule
-
Define how long to store table data before the table is trimmed. Optionally, generate a Timestamp field. The chosen timestamp is added as a secondary index for the table. Valid timestamp fields in the data table's schema populate the dropdown list.
You can set a timestamp for event arrival. This action creates a field rule.
- Predicate Rule
-
Build a rule to register a query against the table where rows are added to the result set are deleted through the publish data path. For this reason, the predicate usually has a time component (see WHEN and FOR clauses for more information).
- No Data Retention Policy
-
Table rows will not be trimmed —
based on retention policy
. See Managing the Size of Data Tables for table trimming options that you can configure independently from retention policies.
Property | Type | Description |
---|---|---|
Table Aliases | string | This can be simply the name of the aliased table, or a formatter string as would be passed to the java.lang.String.format method, where %s is to be replaced with the name of the base table. |
Filter | string | Part of a predicate that is to be appended (using AND or its equivalent in the query language of the table being used) to all queries coming to the aliased table. This predicate should be in the query language of the base table. |
Field Rules: Click the Plus sign to add a new table-level rule.
Field Rule Details: Add a description for the rule.
Variables: Click the Plus sign to define a variable for the rules. Typed variables can be defined that will be used in the table-level rules. Use these to save intermediate calculations which otherwise would have to be re-calculated.
You can optionally automatically set the timestamp on arrival, for a configured retention policy.
The Source tab provides a text-based XML configuration file editor, which is a validating XML editor that is aware of the schema that defines the XML syntax of LiveView configuration files. See Text-Based XML Configuration File Editor for more information.
LiveView supports inclusion of metadata hints
in data tables. You can add semantic
interpretations using visual editor or by directly editing a data table lvconf file's
XML code.
To add semantic interpretations, do the following:
-
Right-click the table field.
The following options appear.
/>
-
Select Semantic Interpretations.
The Edit Semantic Interpretation screen appears.
For example, If semantic interpretation for TotalPassengers is added as 40. You can see the same in code of the xml file like below:
<?xml version="1.0" encoding="ASCII"?> <liveview-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.streambase.com/schemas/lvconf/"> <data-table id="RunningAggregates"> <fields> <field name="TotalPassengers" type="int"> <semantic-interpretation> <interpretation>40</interpretation> </semantic-interpretation> </field> <primary-key> <field ref="Type"/> </primary-key> </data-table> </liveview-configuration>