Adding an Input Stream

Add an input stream to filter income data from particular values.

With Sybase CEP Engine, continuous data flows in data streams (usually just called streams). The project will filter incoming data for particular values, so you must identify how this data is flowing into the project by adding an input stream.

Follow these steps to add an input stream to your project:

  1. Click StockFilter in the Explorer view.
  2. On the Project menu, click Add Input Stream.:


    NewInStream PNG

    The contents of the views include:

    • The Explorer view, which shows the new input stream, identified with a blue arrow and named StreamIn.

    • The Properties view, which shows properties specific to the new stream.

    • The Flow view, which displays an icon for the stream.

    • The Editor view, which displays the statement that creates the new stream.

    Note that right-clicking a project name in the Explorer view opens a shortcut menu containing project-specific commands. You can access similar shortcut menus for any other component displayed in the Explorer view and even for objects displayed in the Flow view. Throughout this tutorial, when you are instructed to click a menu command, you can use the shortcut menu instead if you prefer.

  3. Examine the lines in the Queries tab:
    • Sybase CEP applications are written in Sybase CEP's Continuous Computation Language (CCL), a language similar to SQL. When changes are made to your project using the Sybase CEP Studio user interface, Sybase CEP Studio may insert CCL code for you.

    • CCL reserved words are capitalized by convention to make them easier to differentiate, but CCL is actually case-insensitive. Note that Sybase CEP Studio color-codes different parts of the syntax, displaying reserved words in blue.

    • This statement creates an input stream named StreamIn with a default schema containing a single column.

    • The specific formatting of these lines is mainly for readability. You only need a single space to separate the components of a CCL statement, but CCL treats single spaces, multiple spaces, and new lines as equivalent. A semi-colon ends each CCL statement.

  4. In the Queries tab, replace "StreamIn" with "StockTrades" and then wait a few seconds for Sybase CEP Studio to update the window.:


    SFInStreamView PNG