Create Projects in Event Stream Processor

You need to create at least one stream or window for each message definition in the RAP templates.

Make these streams  output streams, attach the ASE and Sybase IQ Output adapters to them and have them point to the particular table to which the stream writes data. Specify the table within the table property in both adapters. The adapters write out the data coming into this output stream to the Adaptive Server and Sybase IQ databases.

The data you want to store in the databases can be delivered to Event Stream Processor using internal or external input adapters. Internal adapters run within Event Stream Processor and are managed by it while external adapters use the ESP SDK and are run outside of Event Stream Processor within a separate process. For more information on adapters, see the Event Stream Processor Adapters Guide.

Event Stream Processor can perform complex processing of the incoming data before it is stored in the database. For further information on how to preprocess the information before storing it, see the Event Stream Processor documentation.  In RAP 4.1, each database subscriber stored database connection information in an xml file (rapstore.xml or rapcache.xml).  In ESP database connectivity information is provided in the $ESP_HOME/bin/service.xml file. The RAP installer asks you for connection credential information for the Adaptive Server and Sybase IQ databases, and updates this file. To change it later on, update the SybaseASEService and SybaseIQService entries in the service.xml file.

The RAP 5.0 sample project is an example of the conversion of a RAP 4.1 system using the stock quote and stock trade message types and serves as a good starting point for your conversion. The model contains two streams that process incoming data. One stream processes data for stock trades and the other processes stock quotes. 

These input streams are attached to the DSV Input adapter that reads sample stock quote and stock trade data from CSV files. The output streams for both trades and quotes are derived from these input streams by looking up a stock symbol using data read from the instrument table in the Sybase IQ database. This is an example of how to achieve the RAP 4.1 lookup functionality using Event Stream Processor’s capabilities. The ASE and Sybase IQ Output adapters are attached to both of these output streams. The sample project can be found under <install>/RAP-5_0 /RAPCore/workspace/rap/rap.ccl. Here is a sample from rap.ccl:
CREATE SCHEMA StockQuoteInSchema (
                INSTRUMENT_ID STRING,
                QUOTE_DATE DATE,
                QUOTE_SEQ_NBR INTEGER,
                TRADING_SYMBOL STRING,
                QUOTE_TIME BIGDATETIME,   
                ASK_PRICE MONEY(4),      
                ASK_SIZE INTEGER,   
                BID_PRICE MONEY(4),      
                BID_SIZE INTEGER          
                );
CREATE INPUT STREAM StockQuoteInStream SCHEMA StockQuoteInSchema;

The ASE and Sybase IQ Output adapters have the same properties that the RAPCache and RAPStore subscribers previously had (rapcache.xml and rapstore.xml). If you changed those property values from the default values, make this change in the adapters as well.

For detailed information on creating and running a project in Event Stream Processor, see the Event Stream Processor Getting Started Guide, Studio Users Guide, and the Programmers Guide. Generate projects using the ESP Studio.