SOW/View
This section contains a listing of the parameters for a View
section in the SOW
section of an AMPS configuration file. For backward compatibility, AMPS accepts ViewDefinition
as a synonym for View
.
Element
Definition
MessageType
(required)
The message type of the view. This does not need to be the same type as any of the topics in the aggregation, but does need to be a message type that supports views.
The message type must be one of the message types configured for the instance. AMPS includes fix
, xml
, nvfix
, json
, bson
and bflat
message types with full support for views. You can also use any custom message type defined for the configuration file, provided that the message type supports views.
Notice that the binary
message type does not specify a fixed format for the message contents, so that message type cannot be used in a view.
Other message types provided with AMPS may have limitations in their support for views. See the Message Types section in the AMPS User Guide for a discussion of the limitations.
Name
(required)
Defines the topic name for this view.
If no Name
is provided, AMPS accepts Topic
as a synonym for Name
to provide compatibility with versions of AMPS previous to 5.0.
UnderlyingTopic
(required)
Defines the SOW topic or topics on which this view is based.
This element can contain a single topic name, or any number of Join
elements.
Projection/Field
(required)
Defines what the view will contain.
This element can be specified multiple times to compose a complex view. Complex expressions that use aggregation functions and conditional branching can also be used.
Grouping/Field
(required)
Defines how the records in the underlying topic will be grouped.
This is analogous to a SQL GROUP BY clause.
KeyDomain
The seed value for SowKeys
used within this topic.
The default is the topic name, but it can be changed to a string value to unify SowKey
values between different topics.
Join
Within an UnderlyingTopic
, each Join
specifies two topics to join together to create the view, as well as the relationship between those topics.
An UnderlyingTopic
can have any number of Join
specifications. For more information on Join
specifications, see the AMPS User Guide.
Conflation
Defines whether AMPS will attempt to conflate updates to the view.
This item accepts two values:
none
- No conflation. AMPS fully processes every update to the view, in publication order.
inline
- Conflation is active. AMPS conflates multiple updates to the same underlying record where possible. See the AMPS User Guide for details.
Default: none
Filter
Defines a filter for the view. When provided, only messages from the underlying topic that match this filter will be included in the view.
This option is only valid when the view uses a single UnderlyingTopic
. When the view contains a Join
specification, this option may not be used.
Default: No filter, which includes all messages from the UnderlyingTopic
.
HashIndex
AMPS provides the ability to do fast query lookup for records in a view based on specific fields.
When one or more HashIndex
elements are provided, AMPS creates a hash index for the fields specified in the element. These indexes are created on startup, and are kept up to date as records are added, removed, and updated.
The HashIndex
element contains a Key
element for each field in the hash index.
AMPS uses a hash index when a query uses an exact string match for all of the fields in the index. AMPS does not use hash indexes for range queries or regular expressions, or for numeric comparisons.
AMPS automatically creates a hash index for the fields specified in the Grouping
for the view.
JoinNullEquivalency
Specifies whether the Join
expressions in this view should consider NULL
values to be equivalent.
When this is enabled
, missing values, empty strings, and NULL
values will be considered to match in a Join
expression.
When this is disabled
, these values will not match.
Default: disabled
FileName
File location to store view data. Unused in this version of AMPS.
Last updated