@From(eventtable='rdbms', datasource.name='AnalyticsDataSource', table.name='RoomTable', cache='LRU', cache.size='3000') define table RoomTypeTable (roomNo int, type string);
Using Bloom Filters
A Bloom Filter is an algorithm or an approach that can be used to perform quick searches. If you apply a Bloom Filter to a data set and carry out an
isAvailable check on that specific Bloom Filter instance, an accurate answer is returned if the search item is not available. This allows the quick improvement of updates, joins and
The following example shows how to include Bloom Filters in an event table update query.
define stream StockStream (symbol string, price float, volume long); define stream CheckStockStream (symbol string, volume long); @from(eventtable = 'rdbms' ,datasource.name = 'cepDB' , table.name = 'stockInfo' , bloom.filters = 'enable') define table StockTable (symbol string, price float, volume long); @info(name = 'query1') from StockStream insert into StockTable ; @info(name = 'query2') from CheckStockStream[(StockTable.symbol==symbol) in StockTable] insert into OutStream;
Query for inserting events into table is similar to the query of inserting events into event streams, where we will be using "insert into <table name>" code snippet. To insert only the specified output event category use "current events", "expired events" or "all events" keywords between 'insert' and 'into' keywords.