Output MySQL event adapter helps to dump the output events to a MySQL database. It is used as an output event adapter.
...
Follow the steps below to set up the prerequisites before starting the configuration.
- Download MySQL JDBC connector for Java, and add it to
<PRODUCT_HOME>/repository/components/lib/
directory. Create a datasource, as the MySQL event adapter uses Carbon datasources.
Excerpt hidden true NOTE TO WRITERS: Link the word "datasource" above to the page named " Managing Datasources".
...
- Log in to product's management console, and click Configure.
- Click Output Event Adaptors in the Event Processor Configs menu, and then click Add Output Event Adaptor.
Enter
mysql_adapter
for Event Adaptor Name, selectmysql
for Event Adaptor Type, and enter the name of the created datasource
as shown in the below example.- Click Add Event Adaptor.
...
The configured output event adapters are used in event formatters. With output event adapter message properties, event formatters are able to extract data from event streams and format the output events. Following are the output MySQL event adapter-specific message properties.
The message properties of the output MySQL . Message properties specific to output event adapters of the mysql
type can be configured as follows.
- Log into the BAM Management Console. For detailed instructions, see Running the Product.
- In the Main tab, click Event Streams to open the AvailableEvent Streams page.
- Click the Outflows link of the event stream to which the relevant output event adapter is connected. As a result, Event Out-Flows (<Output_Event_Adapter_Name>) opens.
Click on the relevant event builder name to open the Event Formatter Details page.
The message properties of amysql
output event adapter are described below. Change the property values as required.Property Description Composite key columns Column names used in uniqueness check for updates. When an event arrives, the table is searched using the values of these columns and then the matching events are updated. This is not applicable for insert-only mode. Execution Mode Execution mode of the output event. The supported modes are insert-only and insert or update. In insert or update modes, event gets inserted if it doesn't already exist in the table. Otherwise, an existing event in the table is updated. Table Name Name of the database table. Output Event Type The outgoing event type to be mapped. The output MySQL event adapter supports only map type mappings.