Attach
to Cache Data
The Cache data source stores real-time data from
data attachments in memory resident tables, which can themselves be used as data
sources. See the
Caches section for information on adding a
cache. From the Object Properties
window you can access the Attach to Cache Data dialog to connect
an object to this in-memory data. Once a property has
been attached to cache data, it receives continuous updates.
To attach your data, right-click on the Property Name from the Object Properties
window and select Attach to Data>Cache. The Attach to
Cache Data dialog opens. This dialog provides drop-down
menus that allow you to specify information regarding the cache data you want to
display. If the item you require is not listed, type your selection into the
field. You can choose to read data
directly from the Cache data source, or through a configured Data
Server. When you read data directly from the Cache data
source, the Cache drop-down menu in the
Attach To Cache Data dialog
lists all available
caches. See the
Caches section for information on adding a
cache. Drop down menus for Column(s) and
Filter Column populate based on the selected Cache and Table. The
Table, Column(s) and Filter Column drop-down menus will only contain options if the
selected Cache contains tabular information.
To
read data through
a configured Data
Server the Builder must be connected to that
Data Server. In the Attach To Cache Data dialog, select the Data Server
from the Data Server drop-down list. The names of caches deployed on the default or named Data Server
populate the Cache, Table, and
Column(s)
drop-down lists. It is possible to indicate multiple columns for
the filter and multiple values to compare against for each column. If the number
of specified column names does not correspond to the number of values listed,
extra names and/or values are ignored. NOTE: Spaces around separators are
not allowed.
When an object property is
attached to data, the Property Name and Value in the Object Properties
window is displayed in green. This indicates that editing this value
from the Object Properties window is no longer possible. To remove the
data attachment, and resume editing capability in the Object Properties
window, right-click on the Property Name and select Detach from Data.
An object property is detached from the data
source when the Property Name and Value are no longer green.
Attach To Cache Data - Filter Modes
There are three filter options, or modes, for
attaching to cache data:
Filter Rows Off,
Filter Rows Basic and Filter Rows
Advanced.
Filter Rows Off Select
this option if you do not need to
filter
rows.
|
 |
Cache |
Name of the
cache to display. The drop-down menu contains the names of all active caches.
See the
Caches section for information on adding a
cache. If a selection is made in this dialog from the
Data Server drop-down list, this field is populated by that selection. |
Table |
Select the type of table data to display:
Current
or History. If a selection is made
in this dialog from the Data Server drop-down
list, this field is populated by that selection.
If you selected the condenseRowsFlag
property for the cache, the current_condensed table and the history_condensed
table are available in the list. If you also selected the
condenseRowsCombineHistoryFlag property, the history_combo table is
available in the list. When history_combo
is selected, the Update Once checkbox will be replaced by three
Update buttons: Once, On Condense and
Always. Default is On Condense. |
Column(s) |
Select the column(s) to display from the selected Table.
If a selection is made in this dialog from the Data
Server drop-down list, this field is populated by that selection. |
Filter Rows |
Off |
Select not to
filter
rows. Filters can only be used for tabular
data. |
Basic |
For details, see
Attach to Cache Data: Filter Rows Basic.
|
Advanced |
For details, see
Attach to Cache Data: Filter Rows Advanced. |
Update |
Once |
Update listeners
only once when display is opened. |
On Condense |
NOTE: This
option only applies if the selected Table is history_combo.
Update at the interval specified by the cache's
condenseRowsInterval property, rather than whenever new raw data is
applied to the cache. This is useful when, for example, the traceValueTable
of a trendgraph is attached to the history_combo table. |
Always |
NOTE: This
option only applies if the selected Table is history_combo.
Update whenever new raw data is applied to the
cache. This is useful when, for example, the valueTable property of a
table object is attached to the history_combo table. |
Data Server |
Select to read data through your configured Data
Server and not directly from the Cache data source.
The names of caches deployed on the default or named
Data Server populate the Cache, Table, and Columns
drop-down lists. NOTE: If the Display Builder requests the cache names from a
Data Server and does not get a response within 10 seconds, the drop-down lists
will be empty.
Default - Select the default Data
Server you configured in Application
Options>Data Server. Populates the
Cache, Table, and Columns
drop-down lists with the names of the caches deployed on the default Data
Server. If the Builder is not connected to a default Data Server, the names
of the caches loaded locally by the cache data source are shown.
None - Select to bypass data being
redirected through the specified Data
Server(s) for this attachment and instead attach
directly to the data source. Populates the
Cache, Table, and Columns drop-down lists with the
names of the caches loaded locally by the cache data source.
Named Data Servers - Select a
Named Data Server
that you configured in Application Options>Data Server. Populates
the Cache, Table, and
Columns drop-down lists with the names of the caches deployed on that
Data Server.
Multi-Server Attachment - To configure
multiple data servers, enter a semicolon (;) delimited list containing two or
more
Named Data Servers (e.g. ds101;ds102). Each name specified must
correspond with a
Named Data Server
that you configured in Application Options>Data Server. It is also possible to
specify __default and __none (e.g. __default;ds101;ds102).
NOTE: The values __default and __none begin with two
underscore characters.
Alternatively, a value of * can be
entered to specify all data servers, including __default and __none.
When multiple data servers are specified, the
data attachment will be directed to each data server in the list. For tabular
data attachments, a column named DataServerName will be added as the
first column of the table and contain the name of the server from which the
data was received.
A multi-server attachment will receive data
independently from each of the servers it specifies, so in most cases it will
be necessary to combine the tables received into a single table. This can be
accomplished in two ways:
1) The multi-server attachment can be
applied to a local cache that has the DataServerName column specified
as an index column. The current table of that cache will contain the
combination of the tables received from all servers. NOTE: It may also be
necessary to configure cache row expiration settings to remove defunct rows.
2) The multi-server attachment can be applied as the Table argument of the
RTView function named
Combine
Multi-Server Tables.
|
Filter Rows:
Basic Select this option to
filter
rows by
column(s) or values(s).
|
 |
Cache |
Name of the cache to
display. The drop-down menu will contain the names of all active caches.
See the
Caches section for information on adding a
cache. If a selection is made in this dialog from the
Data Server drop-down list, this field is populated by that selection. |
Table |
Select which type of table data to display:
Current
or History. If a selection is made
in this dialog from the Data Server drop-down
list, this field is populated by that selection.
If you selected the condenseRowsFlag
property for the cache, the current_condensed table and the history_condensed
table are available in the list. If you also selected the
condenseRowsCombineHistoryFlag property, the history_combo table is
available in the list. When history_combo
is selected, the Update Once checkbox will be replaced by three
Update buttons: Once, On Condense and
Always. Default is On Condense. |
Column(s) |
Select which
column(s) to display from the selected Table.
If a selection is made in this dialog from the Data
Server drop-down list, this field is populated by that selection. |
Filter Rows |
Off |
For
details, see Attach to Cache Data: Filter Rows Off.
|
Basic |
Filter Column |
Name of
the column to use as a filter. Multiple column names should be entered as a
semicolon (;) delimited list (i.e. col1;col2;col 3). If your column name
contains a space or a semicolon, then the entire name must be enclosed in single
quotes. |
Filter Value |
Value that the Filter Column must equal.
Multiple filter values should be entered as a nested list, where values for a
given column are separated by commas within a semicolon (;) delimited list (i.e.
val1,val2;val3,val4;val5,val6). If your filter value contains a space or a
semicolon, then the entire value must be enclosed in single quotes.
When * is entered as a filter field value,
data for all values in the specified filter column will be used to update the
object property. When * is entered, only the
literal comparative value will be used. These
are only allowed for objects which display tabular data. |
Advanced |
For
details, see Attach to Cache Data: Filter Rows
Advanced. |
Update |
Once |
Update listeners only once when display is opened.
|
On Condense |
NOTE: This option only applies if the selected
Table is history_combo.
Update at the interval specified by the cache's
condenseRowsInterval property, rather than whenever new raw data is
applied to the cache. This is useful when, for example, the traceValueTable
of a trendgraph is attached to the history_combo table. |
Always |
NOTE: This option only applies if the selected
Table is history_combo.
Update whenever new raw data is applied to the
cache. This is useful when, for example, the valueTable property of a
table object is attached to the history_combo table. |
Data Server |
Select to read data through your configured Data
Server and not directly from the Cache data source.
The names of caches deployed on the default or named
Data Server populate the Cache, Table, and Columns
drop-down lists:
Default - Select the default Data
Server you configured in Application
Options>Data Server. Populates the
Cache, Table, and Columns
drop-down lists with the names of the caches deployed on the default Data
Server. If the Builder is not connected to a default Data Server, the names
of the caches loaded locally by the cache data source are shown.
None - Select to bypass data being
redirected through the specified Data
Server(s) for this attachment and instead attach
directly to the data source. Populates the
Cache, Table, and Columns drop-down lists with the
names of the caches loaded locally by the cache data source.
Named Data Servers - Select a
Named Data Server
that you configured in Application Options>Data Server. Populates
the Cache, Table, and
Columns drop-down lists with the names of the caches deployed on that
Data Server.
If the Builder requests the cache names from a
Data Server and does not get a response within 10 seconds, the drop-down lists
will be empty.
|
Filter Rows: Advanced Select
this option to
filter
rows by
column(s) or values(s), time range, and to enable the Extend with SQL
option.
|
 |
Cache |
Name of the cache to
display. The drop-down menu will contain the names of all active caches.
See the
Caches section for information on adding a
cache. If a selection is made in this dialog from the
Data Server drop-down list, this field is populated by that selection. |
Table |
Select which type of table data to display:
Current
or History. If a selection is made
in this dialog from the Data Server drop-down
list, this field is populated by that selection.
If you selected the condenseRowsFlag
property for the cache, the current_condensed table and the history_condensed
table are available in the list. If you also selected the
condenseRowsCombineHistoryFlag property, the history_combo table is
available in the list. When history_combo
is selected, the Update Once checkbox will be replaced by three
Update buttons: Once, On Condense and
Always. Default is On Condense. |
Column(s) |
Select which
column(s) to display from the selected Table.
If a selection is made in this dialog from the Data
Server drop-down list, this field is populated by that selection. |
Filter Rows |
Off |
For
details, see Attach to Cache Data: Filter Rows Off.
|
Basic |
For
details, see Attach to Cache Data: Filter Rows
Basic. |
Advanced |
Filter Column |
Name of
the column to use as a filter. Multiple column names should be entered as a
semicolon (;) delimited list (i.e. col1;col2;col 3). If your column name
contains a space or a semicolon, then the entire name must be enclosed in single
quotes. |
Filter Value |
Value that the Filter Column must equal.
Multiple filter values should be entered as a nested list, where values for a
given column are separated by commas within a semicolon (;) delimited list (i.e.
val1,val2;val3,val4;val5,val6). If your filter value contains a space or a
semicolon, then the entire value must be enclosed in single quotes.
When * is entered as a filter field value,
data for all values in the specified filter column will be used to update the
object property. When * is entered, only the literal comparative value
will be used. These are only allowed for objects which display tabular data. |
Time Range |
Enter the time range
of rows to be returned. Default time unit is seconds, but a suffix
(e.g. m, h, d, w, M,
q, y)
can be specified to indicate minutes, hours, days, weeks, months, etc.
If Time Range is specified but neither a
Begin Time or End Time is entered, then the most recent rows of
data within the specified time range are returned.
If both Begin Time and End Time are
specified, then Time Range is ignored. |
Begin Time |
Minimum timestamp of
rows to be returned. You must specify as a date string or as a long timestamp.
If Time Range is specified but End Time
is not, then data returned will span from Begin Time to Begin Time +
Time Range. |
End Time |
Maximum timestamp of
rows to be returned. You must specify as a date string or as a long timestamp.
If Time Range is specified but Begin Time
is not, then data returned will span from End Time - Time Range to End
Time. |
Extend
with SQL |
Select
to configure a cache to use a SQL query to
retrieve data from an external database. This option is
available when either the Time Range or the Begin Time fields are
not blank, and the selected table name in the Table drop-down list is
not Current. A substitution string, such as $beginTime,
can be entered for these fields. When the Extend with SQL option is not
enabled the cache data source retrieves data from the in-memory cache only. This option also requires the following:
- The historyTableName property for the
cache must specify the name of the database table used for queries.
- The maxNumberOfHistoryRows property for the
cache must have a value greater than 0.
- The the display (.rtv) file that defines the
cache must be loaded by the RTView Historian as a Data Configuration file
(so that the Historian stores the cache data in the database table specified
by the cache historyTableName property).
- There must be an SQL database connection
defined for the database specified in the cache databaseName
property. Or, if the cache databaseName property is blank, there must
be a database connection to the default RTVHISTORY database.
|
Maximum Rows |
If the value specified is not zero,
it is used to limit the row size of any SQL query that is performed to satisfy
the time period in the attachment. When Extend with SQL is selected, a
default value of 1000 is automatically entered but can be changed by the
user. A value of zero or blank means there is no limit. |
Update |
Once |
Update listeners only once when display is opened.
|
On Condense |
NOTE: This option only applies if the selected
Table is history_combo.
Update at the interval specified by the cache's
condenseRowsInterval property, rather than whenever new raw data is
applied to the cache. This is useful when, for example, the traceValueTable
of a trendgraph is attached to the history_combo table. |
Always |
NOTE: This option only applies if the selected
Table is history_combo.
Update whenever new raw data is applied to the
cache. This is useful when, for example, the valueTable property of a
table object is attached to the history_combo table. |
Data Server |
Select to read data through your configured Data
Server and not directly from the Cache data source.
The names of caches deployed on the default or named
Data Server populate the Cache, Table, and Columns
drop-down lists:
Default - Select the default Data
Server you configured in Application
Options>Data Server. Populates the
Cache, Table, and Columns
drop-down lists with the names of the caches deployed on the default Data
Server. If the Builder is not connected to a default Data Server, the names
of the caches loaded locally by the cache data source are shown.
None - Select to bypass data being
redirected through the specified Data
Server(s) for this attachment and instead attach
directly to the data source. Populates the
Cache, Table, and Columns drop-down lists with the
names of the caches loaded locally by the cache data source.
Named Data Servers - Select a
Named Data Server
that you configured in Application Options>Data Server. Populates
the Cache, Table, and
Columns drop-down lists with the names of the caches deployed on that
Data Server.
If the Builder requests the cache names from a
Data Server and does not get a response within 10 seconds, the drop-down lists
will be empty.
|
Validation Colors
Fields in the dialog change colors according to
the information entered. These colors indicate whether or not information is
valid. Information entered into the dialog is validated against your active
Caches.
The following describes the significance
of the Attach to Cache Data validation colors:
|
Blue |
Unknown |
Entry does
not match any known Cache. |
|
White |
Valid state |
Entry is valid. |
|
Red |
Invalid state |
Cache
is valid, but Column(s) or Filter Column selected are not. |
Substitutions
Substitutions allow you
to build open-ended displays in which data attachments depend on values
defined at the time the display is run. Generic
names, such as $cache1 and $cache2, are used instead of values for specific
cache names. Later when the display is running, these generic values are
defined by the actual names of specific cache names. In
this way, a single display can be reused to show data from a number of
different sources. For more information on creating displays using substitution
values, see Substitutions.
RTViewDs
The RTViewDs cache contains tables with information about each
table maintained by the cache data source. NOTE: RTViewDs tables do not support SQL queries, row filters, custom
query intervals or maximum row settings.
In the Attach to Cache Data dialog, enter RTViewDs
in the Cache field and then select one of the following RTViewDs tables
from the Table drop down menu:
- CacheObjectProperties
Contains all of the scalar property values
for each tabular cache.
- Tables
Contains runtime information about the size of each
cache table.
- cacheDefs
Contains cache configuration information.
RTViewDs
tables contain the following columns, with one row for each table defined by the
cache data source. The CacheObjectProperties table contains a row for
each tabular cache, with the cache name in the first column followed by a column
for each obj_cache_table scalar property listed in alphabetic order by property
name. Tabular properties, like initialTable and valueTable, are
not included. Non-tabular caches defined by obj_cache_double instances are not
listed in the table.
RTViewDs Cache Table Name |
Column Available |
Description |
CacheObjectProperties |
One column for each cache
property. |
See
Caches>Introduction for descriptions of cache
properties. |
Tables |
%Full |
The amount of space, in percent, used in the cache
table.
In history tables, the %Full column shows
the table row count divided by its maxNumberOfHistoryRows limit. Or, if
the cache historyTimeSpan limit is not zero, the %Full column
displays the table time span divided by its historyTimeSpan limit,
whichever is larger. The value is converted to a percentage between 0 and 100.
NOTE: If the history table size is limited by the
historyTimeSpan property, the %Full value may never reach 100%.
This is because when the old rows are removed from the table, the actual time
span of the remaining rows may be less than the historyTimeSpan limit.
For current tables, if the maxNumberOfCurrentRows property has a value
greater than 0, the %Full column shows the table row count divided
by maxNumberOfCurrentRows, converted to a percentage between 0 and 100.
Otherwise, the value of the %Full column is NaN. |
Table |
The name of the cache
table. |
Rows |
The number of rows in the
table. |
Columns |
The number of columns in
the table |
Memory |
The estimated current
size of the table, in bytes. |
cacheDefs |
Tag |
The cache name and the table name:
<cachename>.<tablename>
Example:
sales.cacheDefs |
Cache
|
The name of the cache. |
Table |
The name of the table. |
AllColumns
|
The names of all columns
in the table. |
IndexColumns
|
The names of all index
columns in the table. |
DataColumns |
The names of all
non-index columns in the table. |
TimestampColumn
|
The name of the timestamp
column in the table. |
AllColumnTypes
|
A list of column data
types (for example, string, int, double, date, etc.)
in the the table. |
MaxRows |
The value of the
maxNumberOfCurrentRows property NOTE: This applies only to history tables.
|
TimeSpan |
The value of the
rowExpirationTime property. NOTE: This applies only to history tables. |
Description
|
The value of the
description property. |
File |
The name of the .rtv
file from which the cache definition object was loaded. |
Select Table Columns
From the Attach to Cache Data dialog
you can specify which table columns to display and in what order they will
appear. In order to populate the listing of available columns, you must
first select a valid Cache.
To bring up the Select Columns dialog,
click on the ellipse button in
the Column(s) field (or right-click in the Column(s) field and choose Select
Columns). The dialog should contain a list of Available Columns that
you can add to your table.
To add a column, select an item from
the Available Columns list and click on Add. If the item you
require is not listed, type your selection into the Enter Column Name field.
Click Remove to delete an item previously added to the Selected
Columns list. You can control the order of columns in a table by arranging
the items in the Selected Columns list with the Move Up and Move Down buttons.
If no data is available for a table
row within a selected column, the table cell will display one the following
values: N/A, false, 0, or 0.0.
The following describes the
Attach to Cache Data dialog commands:
Command |
Description |
OK |
Applies
values and closes the dialog. |
Apply |
Applies
values without closing the dialog. |
Reset |
Resets
all fields to last values applied. |
Clear |
Clears
all fields. Detaches object from data source (once Apply or OK is selected). |
Cancel |
Closes
the dialog with last values applied. |
|