Adding an Input Window Manually

Add an input window to the diagram in the sample PortfolioValuation project.

These steps let you create an input window directly, and define the schema, without importing a schema.

If you used the input adapter to discover the schema and generated both input windows automatically, skip these steps and go directly to the next task.

  1. In the Visual editor, in the Palette to the right of the diagram, open the Streams and Windows compartment.
  2. Click input_window.gif Input Window.
  3. Click in an empty area in the diagram where you want to insert the input window.
    The input window object is added to the project. The red border indicates that it needs more definition to be valid.
  4. To set the name of the input window, either:
    • In iconic mode, click once to select the shape, then click again to edit the name.
    • In verbose mode, click the edit icon next to the name.
    For this example, enter the name PriceFeed.
  5. Click the "plus" sign to expand the shape to verbose mode if necessary, and click Add Column (column.gif) on the toolbar in the input window, to add each new column.
    Tip: Hover over any icon to see its name.
    A new column is created with a default name, and default datatype of integer.
  6. Specify additional columns.
    1. Double-click each column name to edit it.
    2. Then double-click each datatype to select the correct datatype.
    For this example, enter these column names and datatypes:
    • Id – integer
    • Symbol – string
    • TradeTime – date
    • Price – float
    • Shares – integer
  7. Click the column.gif button for the Id column to toggle it to the Key symbol.
    Input windows require a primary key.
    The Id column is now the primary key for the PriceFeed input window. The red warning border disappears, indicating that the element is now valid.
  8. Create a retention window.
    1. Click Set Keep Policy retention_window.gif.
    2. In the Edit Keep Policy dialog, choose Time, and enter 10 MIN in the text box to its right. Click OK.
    The default policy is to keep all rows of incoming data.
    This step defines a CCL KEEP clause, and retains all price events received in the last 10 minutes. Without a KEEP clause, the PriceFeed window would grow infinitely large. For more information on specifying a retention policy, see the Studio Users Guide.
  9. Save (Ctrl+S).
    This saves changes to both the .cclnotation file (the diagram) and the .ccl file (the CCL).
The input window and its schema (or deduced schema) are in the diagram.