Striim 3.10.3 documentation

Table of Contents

Creating sources and caches using Source Preview

Source Preview is a graphical alternative to defining sources and caches using TQL. With it, you:

  1. browse regular or HDFS volumes accessible by the Striim server

  2. select the file you want

  3. select the appropriate parser (Apache, structured text, unstructured text, or XML)

  4. choose settings for the selected parser, previewing the effects on how the data is parsed

  5. generate a new application containing the source or cache, or add it to an existing application

For sources, Source Preview will also create:

  • a CQ to filter the raw data and convert the fields to Striim data types

  • a stream of type WAEvent linking the source and CQ

  • an output stream of a new type based on the parser settings you chose in Source Preview

Create a source

The following steps create a source from the sample data used by PosApp:

  1. From the main Striim menu, select Source Preview.

  2. Click Samples.

  3. Select PosDataPreview.csv, then click Preview.

  4. Check Use first line for column names and set columndelimiter to , (comma).

  5. PosApp uses only the MERCHANTID, DATETIME, AUTHAMOUNT, and ZIP columns, so uncheck the others.

  6. Set the data types for DATETIME to DateTime (select Unix Timestamp) and for AUTHAMOUNT to Double. Leave MERCHANTID and ZIP set to String.

  7. The data is now parsed correctly, the columns have been selected, and their names and data types have been set, so click Save.

  8. Set the Save Data Source application options as shown below, then click Next.

  9. Set the source as shown below, then click Save.


The new PosSourceApp application appears in the flow editor.


At this point you could add additional components such as a window, CQ, and target to refine the application, or export it to TQL for use in manually coded applications.

Add a cache

The following steps will add a cache to the PosSourceApp application:

  1. From the menu at top left, select Source Preview, click Browse, navigate to Samples/PosApp/appData, select USAddressesPreview.txt, and click Preview.

  2. Check Use first line for column names, set columndelimiter to \t (tab), set the data type for latVal and longVal to Double, and click Save.

  3. Set the Save Data Source options as shown below, then click Save.



If you save as a cache and deploy the application, the entire file will be loaded into memory.

Continue with Modifying an application using the Flow Designer.