Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added a missing comma

define table <table-id> (<attribute-name> <type> {, <attribute-name> <type>}*)
from ('parameterName'='value')+ }?  

Event tables allow you to store, retrieve and process events in a database table-like structure. These are designed for usecases where events need to be extracted from the stream and accumulated over a long period for real-time (or non real-time) batch processing, such as performing comparisons with the incoming event stream or feeding it to BAM. 

Unlike predefined tables, event tables can have sophisticated storage and retrieval criteria. A single event table can be used in multiple SiddhiQL expressions. Depending on the requirements, an event table can be defined either in-memory or in a relational database. CEP supports event tables for widely used databases such as MySQL.

...

define table cseEventTable (symbol string, price int, volume float) from ('datasource.name'='cepDataSource', 'table.name'='cepEventTable'   , 'create.query'='CREATE TABLE cepEventTable (symbol VARCHAR(40), price DECIMAL, volume BIGINT )')

...