Contents
In this sample, the TIBCO Streaming® Matrix operator is used to create a list of tuples.
In StreamBase Studio, import this sample with the following steps:
-
From the top-level menu, select
> . -
Enter
matrix
to narrow the list of options. -
Select
from the category. -
Click
.
StreamBase Studio creates a single project containing the sample files.
In the AllSelected sample, the TIBCO Streaming® Matrix operator is configured to create a list of tuples and output the list only when all the selected values change between the last input tuple and second-to-last input for all the selected fields, which in this sample are the Temperature and Voltage fields.
-
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Updating
,Downloading
,Building
, orRebuild project
messages finish before you proceed. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
Matrix_AllSelected.sbapp
module. Make sure the module is the currently active tab in the EventFlow Editor. -
Click the Run button. This opens the SB Test/Debug perspective and starts the module.
-
In the Feed Simulations view, select the available feed simulation and click the Run button.
-
In the Output Streams view, observe tuples emitted on the
DataOut
output stream. -
Press F9 or click the Stop Running Application button.
In the AnySelected sample, the TIBCO Streaming® Matrix operator is configured to create a list of tuples and output the list only when any of the selected values change between the last input tuple and second-to-last input for all the selected fields, which in this sample is the Temperature and Voltage fields.
-
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Updating
,Downloading
,Building
, orRebuild project
messages finish before you proceed. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
Matrix_AnySelected.sbapp
module. Make sure the module is the currently active tab in the EventFlow Editor. -
Click the Run button. This opens the SB Test/Debug perspective and starts the module.
-
In the Feed Simulations view, select the available feed simulation and click the Run button.
-
In the Output Streams view, observe tuples emitted on the
DataOut
output stream. -
Press F9 or click the Stop Running Application button.
In the Interval sample, the TIBCO Streaming® Matrix operator is configured to create a list of tuples and output the list every 1 second, with a maximum of 5 tuples in the list.
-
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Updating
,Downloading
,Building
, orRebuild project
messages finish before you proceed. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
Matrix_Interval.sbapp
module. Make sure the module is the currently active tab in the EventFlow Editor. -
Click the Run button. This opens the SB Test/Debug perspective and starts the module.
-
In the Feed Simulations view, select the available feed simulation and click the Run button.
-
In the Output Streams view, observe tuples emitted on the
DataOut
output stream. -
Press F9 or click the Stop Running Application button.
In the RowAdded sample, the TIBCO Streaming® Matrix operator is configured to create a list of tuples and output the list every time a new tuple is added.
-
In the Project Explorer view, open this sample's folder.
Keep an eye on the bottom right status bar of the Studio window. Make sure any
Updating
,Downloading
,Building
, orRebuild project
messages finish before you proceed. -
Open the
src/main/eventflow/
folder.packageName
-
Double-click to open the
Matrix_RowAdded.sbapp
module. Make sure the module is the currently active tab in the EventFlow Editor. -
Click the Run button. This opens the SB Test/Debug perspective and starts the module.
-
In the Feed Simulations view, select the available feed simulation and click the Run button.
-
In the Output Streams view, observe tuples emitted on the
DataOut
output stream. -
Press F9 or click the Stop Running Application button.
When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.
Important
Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.
Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:
studio-workspace
/sample_matrix
See Default Installation Directories for the default location of studio-workspace
on your system.