Striim

Welcome to the Striim Help Center and Community Site

3.10.1 Hands-on quick tour

Follow

If you already have Striim installed and running, continue with Viewing dashboards.

Otherwise, see Installing Striim for evaluation purposes.

Viewing dashboards

If you are not on the Striim home page, go there by selecting Home from the menu at top left.

Screen_Shot_2015-12-31_at_8.31.31_AM.png
  1. Click Apps.

    Screen Shot 2017-02-14 at 2.45.57 PM.png

    If you don't see PosApp, click Add App > Import Existing App, navigate to Striim/Samples/PosApp, double-click PosApp.tql, enter Samples as the namespace, and click Import.

  2. Click the  next to PosApp, select Deploy, and click Deploy.

  3. When deployment completes, click again and select Start. The counter at the top right should start counting up, indicating that alerts are being generated.

  4. From the top left menu, select Dashboards, then click PosAppDash.

It may take a minute for enough data to load that your display looks like the following. The PosApp sample application shows credit card transaction data for several hundred merchants (for more information, see PosApp).

Screen_Shot_2017-10-20_at_10_37_38_AM.png

Hover the mouse over a map or scatter plot point, bar, or heat-map segment to display a pop-up showing more details.

Click a map or plot point to drill down for details on a particular merchant:

Screen_Shot_2015-09-22_at_4.40.30_PM.png

To return to the main page, click PosAppDash in the "breadcrumbs":

breadcrumbs.png

You can filter the data displayed in the dashboard using page-level or visualization-level text search or time-range filters.

page_level_filters.png

With the above text search, the dashboard displays data only for Recreational Equipment Inc.

page_filtered.png

Click the x in the search box to clear the filter.

To try the time-range filter, click the filter icon at the top right of the scatter chart, select StartTime, and set the dialog as shown below:

scatter_chart_time_filter.png

Click Cancel to clear the filter.

pages_icon.png

Click the Pages icon at top left and select Interactive HeatMap.

webclient07.png

On this page, you can click the labels on the pie charts to filter the data. If you zoom in on the Leaflet map, you will see place and street names and other details:

webclient08.png

To clear the filter and return to viewing all data, select Drill-down parameters (the eye icon) and click Clear All.

drilldownparams.png

When you are through exploring the dashboard, continue with Creating sources and caches using Source Preview.

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.

    Screen_Shot_2015-09-22_at_4.44.52_PM.png
  2. Click Samples.

    source_preview_samples.png
  3. Select PosDataPreview.csv, then click Preview.

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

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

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

    312_source_preview_06.png
  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.

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

    spsave2.png

The new PosSourceApp application appears in the flow editor.

spnewapp.png

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.

    select_cache_file.png
  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.

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

    cache1.png
    cache2.png

Warning

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.

Modifying an application using the Flow Designer

The instructions in this topic assume you have completed the steps in Creating sources and caches using Source Preview and are looking at PosSourceApp in the Flow Designer:

fd1.png

We will enhance this application with a query to join the source and cache and populate a target and WActionStore.

  1. Collapse Sources and expand Base Components.

    fd2.png
  2. Click WActionStore, drag it into the workspace, and drop.

  3. Set the name to PosSourceData.

    2016-04-14_16-07-47.png
  4. Click in the Type field and enter PosSourceContext as a new type.

  5. Click Add Field four times.

  6. Set the fields and data types as shown below. Click the key icon next to MerchantId to set it as the key for PosSourceContext.

    Screen_Shot_2016-04-14_at_4.19.20_PM.png
  7. Add four more fields as shown below.

    Screen_Shot_2016-04-14_at_4.16.41_PM.png
  8. Click the Save just below the types (not the one at the bottom of the property editor).

  9. Set Event Types to PosSourceContext, set Key Field to Merchant ID, and click Save (the one at the bottom of the property editor).

  10. Drag a continuous query (CQ) into the workspace.

  11. Set the name to GenerateWactionContext.

  12. Enter or paste the following in the Query field:

    SELECT p.MERCHANTID,
      p.DATETIME,
      p.AUTHAMOUNT,
      z.Zip,
      z.City, 
      z.State,
      z.LatVal,
      z.LongVal
    FROM PosSource_TransformedStream p, ZipCache z
    WHERE p.ZIP = z.Zip
  13. Set Output to Existing Output and PosSourceData. The configuration dialog should look like this:

    Screen_Shot_2016-04-20_at_7.25.47_AM.png
  14. Click Save. The application should look like this:

    fd3.png
  15. The status should now show Created. Select Deploy App.

    2016-04-20_07-29-19.png
  16. When the status changes to Deployed, select the stream icon below GenerateWactionContext, then click the eye icon or Preview On Run. The data preview pane will appear at the bottom of the window.

    preview_on_run.png
  17. Click Deployed and select Start App. Counts will appear above each of the application's components indicating how many events it is processing per second. (Since this application has a small amount of data, these counts may return to zero before they are refreshed. Run MultiLogApp for a larger data set where the counts will be visible for longer.)

    Screen_Shot_2016-04-18_at_1.29.03_PM.png

    The first 100 events from the GenerateWactionContext output stream will be displayed in the preview pane.

    preview_pane.png

At this point, the WActionStore contains data, so we can query or visualize it. Continue with Browsing data with ad-hoc queries.

Browsing data with ad-hoc queries

Ad-hoc queries let you do free-form queries on WActionStores, caches, or streams in real time by entering select statements in the Tungsten console. The syntax is the same as for queries in TQL applications (see CREATE CQ (query)) .

The following example assumes you performed the steps in Modifying an application using the Flow Designer, including deploying and starting the application.

  1. Open a terminal window and start the Tungsten console. If Striim is installed in /opt, the command is: /opt/Striim/bin/console.sh

  2. Log in with username admin and the password you provided when you installed Striim.

  3. At the W (admin) > prompt, enter the following: select * from PosSourceNS.PosSourceData; You should see something like the following:

    [
       MerchantId = Mpc6ZXJBAqw7fOMSSj8Fnlyexx6wsDY7A4E
       DateTime = 2607-11-27T09:22:53.210-08:00
       Amount = 23.33
       Zip = 12228
       City = Albany
       State = NY
       LatVal = 42.6149
       LongVal = -73.9708
    ]
    [
       MerchantId = Mpc6ZXJBAqw7fOMSSj8Fnlyexx6wsDY7A4E
       DateTime = 2607-11-27T09:22:53.210-08:00
       Amount = 34.26
       Zip = 23405
       City = Machipongo
       State = VA
       LatVal = 37.4014
       LongVal = -75.9082
    ]
  4. Press Enter to exit the query.

  5. If you prefer, you can see the data in a tabular format. To try that, enter: set printformat=row_format;

  6. Press cursor up twice to recall the query, then press Enter to run it again. You should see the following (if necessary, widen the terminal window to format the table correctly):

Screen Shot 2016-08-04 at 11.33.20 AM.png

To switch back to the default format:

set printformat=json;

Continue with Creating a dashboard.

Creating a dashboard

In Viewing dashboards you saw the dashboard of the PosApp sample application. Now you will create one from scratch.

The following instructions assume you completed the steps in Modifying an application using the Flow Designer and Browsing data with ad-hoc queries and that the application is still running.

  1. From the main menu, select Dashboards.

    select_dashboards.png
  2. Click Add Dashboard, under Create a new Dashboard enter PosSourceDash, click Create New, select PosSourceNS as the namespace, and click Use this namespace. A blank dashboard will appear.

    dashboard_blank.png
  3. To add a visualization to the dashboard,drag a Vector Map from the visualization palette and drop it on the grid.

    2017-02-14_15-16-03.png
  4. The first step in configuring a dashboard is to specify its query: click Edit Query.

    dashboard_query.png
  5. In the Name field, enter PosSourceNS.PosSourceDataSelectAll. Then type select * from (ending with a space), press Ctrl-space, double-click on PosSourceData, type a semicolon (the query should read select * from PosSourceData;), and click Save Query.

    dashboard_configure.png
  6. Click Configure.

    dashboard_properties_1.png
  7. Set the map properties as shown above, then click Save Visualization.

    Screen_Shot_2015-09-01_at_5.03.38_PM.png
  8. Since the data is all in the continental United States, you might want to edit the settings to center it there. You could also change the Bubble Size settings so that the dots on the map vary depending on the amount.

    Screen_Shot_2015-09-01_at_4.51.16_PM.png
  9. Click Configure again, change the settings as shown above, click Save Visualization, then refresh your browser to apply the new zoom settings.

    Screen_Shot_2015-09-01_at_5.09.24_PM.png

Experiment with the settings or try more visualizations if you like. For more information on this subject, see Dashboard Guide.

Continue with Exporting applications and dashboards

Exporting applications and dashboards

To save the work you have done so far, you can export the application and dashboard to files.

  1. From the upper-left menu, select Apps.

  2. From PosSourceApp's menu, select Export TQL.

    2016-04-22_09-46-34.png
  3. Click Export without passphrase (since the app contains no Encrypted passwords).

  4. Optionally, change the file name or directory, then click Save.

  5. From the upper-left menu, select Dashboards.

  6. Click PosSourceDash.

  7. Select Export, optionally, change the file name or directory, then click Save.

    2016-04-22_09-48-05.png

You may import the exported application TQL file and dashboard JSON file to any namespace. Note that for the dashboard to work you must import it to the same namespace as the application.

You may edit the exported TQL file as discussed in the Programmer's Guide.

What next?

See Web UI Overview for a look at additional Striim features.

Run the CDC demo applications to explore Striim's data migration capabilities (see Running the CDC demo apps).

If you do not plan to write Striim applications but would like to create or modify dashboards, continue with the Dashboard Guide  and PosAppDash in the Programmer's Guide.

Note

The Striim platform's TQL programming language is in many ways similar to SQL, particularly as regards SELECT statements. The Programmer's Guide assumes basic knowledge of SQL.

To learn to write Striim applications, continue with the Programmer's Guide.

3.10.1
Was this article helpful?
0 out of 0 found this helpful

Comments