If you already have Striim installed and running, continue with Viewing dashboards.
Otherwise, see Installing Striim for evaluation purposes.
If you are not on the Striim home page, go there by selecting Home from the ≡ menu at top left.
If you don't see PosApp, click Add App > Import Existing App, navigate to
Striim/Samples/PosApp, double-click PosApp.tql, enter
Samplesas the namespace, and click Import.
Click the ⋮ next to PosApp, select Deploy, and click Deploy.
When deployment completes, click ⋮ again and select Start. The counter at the top right should start counting up, indicating that alerts are being generated.
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).
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:
To return to the main page, click PosAppDash in the "breadcrumbs":
You can filter the data displayed in the dashboard using page-level or visualization-level text search or time-range filters.
With the above text search, the dashboard displays data only for Recreational Equipment Inc.
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:
Click Cancel to clear the filter.
Click the Pages icon at top left and select Interactive HeatMap.
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:
To clear the filter and return to viewing all data, select Drill-down parameters (the eye icon) and click Clear All.
When you are through exploring the dashboard, continue with Creating sources and caches using Source Preview.
Source Preview is a graphical alternative to defining sources and caches using TQL. With it, you:
browse regular or HDFS volumes accessible by the Striim server
select the file you want
select the appropriate parser (Apache, structured text, unstructured text, or XML)
choose settings for the selected parser, previewing the effects on how the data is parsed
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
The following steps create a source from the sample data used by PosApp:
From the main Striim menu, select Source Preview.
Select PosDataPreview.csv, then click Preview.
Check Use first line for column names and set columndelimiter to
PosApp uses only the MERCHANTID, DATETIME, AUTHAMOUNT, and ZIP columns, so uncheck the others.
Set the data types for DATETIME to DateTime (select Unix Timestamp) and for AUTHAMOUNT to Double. Leave MERCHANTID and ZIP set to String.
The data is now parsed correctly, the columns have been selected, and their names and data types have been set, so click Save.
Set the Save Data Source application options as shown below, then click Next.
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.
The following steps will add a cache to the PosSourceApp application:
From the menu at top left, select Source Preview, click Browse, navigate to
Samples/PosApp/appData, select USAddressesPreview.txt, and click Preview.
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.
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.
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:
We will enhance this application with a query to join the source and cache and populate a target and WActionStore.
Collapse Sources and expand Base Components.
Click WActionStore, drag it into the workspace, and drop.
Set the name to PosSourceData.
Click in the Type field and enter PosSourceContext as a new type.
Click Add Field four times.
Set the fields and data types as shown below. Click the key icon next to MerchantId to set it as the key for PosSourceContext.
Add four more fields as shown below.
Click the Save just below the types (not the one at the bottom of the property editor).
Set Event Types to PosSourceContext, set Key Field to Merchant ID, and click Save (the one at the bottom of the property editor).
Drag a continuous query (CQ) into the workspace.
Set the name to GenerateWactionContext.
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
Set Output to Existing Output and PosSourceData. The configuration dialog should look like this:
Click Save. The application should look like this:
The status should now show Created. Select Deploy App.
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.
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.)
The first 100 events from the GenerateWactionContext output stream will be displayed in the preview pane.
At this point, the WActionStore contains data, so we can query or visualize it. Continue with 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.
Open a terminal window and start the Tungsten console. If Striim is installed in
/opt, the command is:
Log in with username
adminand the password you provided when you installed Striim.
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 ]
Press Enter to exit the query.
If you prefer, you can see the data in a tabular format. To try that, enter:
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):
To switch back to the default format:
Continue with Creating a dashboard.
In Viewing dashboards you saw the dashboard of the PosApp sample application. Now you will create one from scratch.
From the main menu, select Dashboards.
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.
To add a visualization to the dashboard,drag a Vector Map from the visualization palette and drop it on the grid.
The first step in configuring a dashboard is to specify its query: click Edit Query.
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.
Set the map properties as shown above, then click Save Visualization.
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.
Click Configure again, change the settings as shown above, click Save Visualization, then refresh your browser to apply the new zoom settings.
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
To save the work you have done so far, you can export the application and dashboard to files.
From the upper-left menu, select Apps.
From PosSourceApp's menu, select Export TQL.
Click Export without passphrase (since the app contains no Encrypted passwords).
Optionally, change the file name or directory, then click Save.
From the upper-left menu, select Dashboards.
Select Export, optionally, change the file name or directory, then click Save.
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.
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).
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.