Apama 10.3.1 | Apama Documentation | Connecting Apama Applications to External Components | Working with IAF Plug-ins | The Integration Adapter Framework | The Semantic Mapper layer
 
The Semantic Mapper layer
The Semantic Mapper maps and transforms incoming messages into Apama events that can be passed into the correlator. Conversely, it can accept incoming Apama events and map them into messages that can be sent upstream on the user's message sink.
Apama events are rigidly defined. Every event must be structured according to a well-defined type definition. Therefore all events are of a specific named type, where this defines the number of fields (or parameters) in the event, their order, the name of each field, and its type. Furthermore it is possible to define which fields are relevant for querying in EPL event expressions, and which are not. See Developing Apama Applications for further information on event type definitions and EPL event expressions. This rigorous format permits the correlator to be highly optimized and contributes towards Apama's scalable performance.
The source messages that are to be passed into Apama as events (or the sink messages that Apama needs to generate) might match this specification, in which case the mapping will be straightforward. However, they might also differ in several ways, some of which are listed here:
*The messages might be self-describing, and need to be parsed in order to deduce what fields they contain.
*The fields contained in every message might appear in varying order.
*Some messages of different types and with differing sets of fields might reflect the same information but in a different format (e.g. trade events from different markets or news headlines from different sources).
*The set of fields contained in messages might differ even if the messages are all of the same type.
*The messages might not be of an obvious type, and their nature (e.g. a trade event or a news headline) might need to be deduced from their contents.
*The set of fields might be enhanced over time to capture additional information.
*Some messages might have fields that are completely irrelevant.
*Some messages might have fields that are irrelevant for matching on but might be useful otherwise.
In order to address these conditions and allow meaningful Apama events to be created from external messages, the Semantic Mapper supports a semantically rich set of translation and transformation rules. These need to be expressed in the IAF configuration file.
The rules available are described in Event mappings configuration.
You can configure an adapter so that some events bypass this kind of mapping in the Semantic Mapper. Instead of mapping each field in an incoming event to a field in an Apama event or the converse, the entire event is treated as a string in a single field.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.