Use a database subquery to read data from kdb+ into Sybase CEP Engine.
INSERT INTO OutStream SELECT DbResult.StockSymbol, DbResult.Price, DbResult.Volume FROM PulseStream, (DATABASE "MyKdbService" SCHEMA (StockSymbol STRING, Price FLOAT, Volume INTEGER) [[select StockSymbol, Price, Volume from trades]] ) as DbResult ;
DATABASE "MyKdbService"
Ensure the service name, MyKdbService is defined in the c8-services.xml file.
select StockSymbol, Price, Volume from tradesfrom the database subquery and sends this query to the kdb+ server, which executes the query and returns the requested data. Use the q language to write the query that you send to the kdb+ server. The query may use parameters.