Storage Integration
This section explains how to configure WSO2 Siddhi tables to store/retrieve and modfiy data in stream processing.
By default, a Siddhi table definition would refer to an in-memory table. If the tables are to be created in an external database, the datasource details must be specified as elaborated under the 'Referring to datasources' section.
Referring to datasources
The @store annotation allows to refer to extenal datasources. A datasource could be referred to as in the following example.
@store(type="rdbms", jdbc.url="jdbc:mysql://localhost:3306/sp_samples", username="root", password="root", jdbc.driver.name="com.mysql.jdbc.Driver") define table StockTable (symbol string, price float, volume long);
Supported store implementations in Stream Processor 4.0 include the following:
RDBMS store (which in turn supports the following)
H2
MySQL
Oracle Database
MS SQL Server
PostgreSQL
IBM DB2
Apache HBase
Apache Solr
MongoDB
A datasource could also be defined externally, and referred to from several siddhi applications as described under Connecting to Stores section.
More information on Storage Integration is provided under the following sections