Apama 10.1 | Apama Documentation | Connecting Apama Applications to External Components | Standard IAF Plug-ins | Codec IAF Plug-ins | The CSV codec IAF plug-in | Multiple configurations and the CSV codec
 
Multiple configurations and the CSV codec
The CSV codec supports multiple configurations for interpreting separated data from different sources. A transport that is using the CSV codec can use the com.apama.iaf.plugin.ConfigurableCodec interface to set up different configurations for interpreting data from multiple sources that use different formats.
The transport can set a configuration by calling the following method on the codec:
public void addConfiguration(int sessionId,
                             NormalisedEvent configuration)
    throws java.io.IOException
The sessionId represents the ID value for this configuration.
The normalized event should contain the following key/value pairs stored as strings that will be parsed in the codec:
Key
Value
separator
The character that is to be used as the separator character, for example, a comma (,) or semicolon (;).
excelCompatible
Optional. If set to true, Excel compatibility mode is enabled. Double quotes are then used to match the behavior of Excel. Default: false.
The transport can remove a configuration by calling the following method:
void removeConfiguration(int sessionId) throws java.io.IOException
The sessionId represents the ID value initially used to add the configuration with the addConfiguration() method.

Copyright © 2013-2018 | 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.