Samples Guide Contents

StreamBase sample projects help you learn how to design EventFlow applications. The tables of available samples below are organized in the same categories found the Import Samples and Community Content dialog.

Topic Description
LiveView Samples Guide Catalog of READMEs for Spotfire LiveView samples.
Loading Samples in Studio Using the File>Import Samples and Community Content dialog.
Online Component Resources Locating more examples in the Online Component Resources.
Accelerator Discovery Import Accelerators from TIBCO Accelerator Discovery.

Application Samples

This sample category includes EventFlow applications that focus on basic StreamBase functionality and solving business problems.

Topic Description
Best Bids and Asks Sample Shows an example of a common stock trading application that tracks the highest bid price and lowest ask price for each stock.
Bollinger Band Sample Shows an example of a common analytical tool that provides a relative definition of high and low bands in securities trading.
Debugger Breakpoints Sample Shows how to set breakpoints for debugging applications in StreamBase Studio.
Error Streams Sample Demonstrates how to use Error Ports and Streams.
FeedProc Sample Shows an example of an application that processes financial tick data from three financial feeds, performing various useful computations on the data.
First Application Sample Use this sample while stepping through the tutorial in the Getting Started Guide. The tutorial is designed for first-time StreamBase Studio users.
Interfaces Sample Demonstrates how to use StreamBase interfaces to enforce a set of stream and schema definitions, and to use different implementations of the same interface for different purposes.
Loop Sample Demonstrates how to use a simple loop in an EventFlow application.
MACD Sample Shows an example of a momentum indicator: a program that follows trends and shows the relationship between two moving averages of prices.
Output Filtering Sample Demonstrates the use of output filtering to allow StreamBase client applications to receive only the tuples that they are supposed to receive, based on a keyword.
Type Coercion Sample Demonstrates when a numeric data type can be automatically coerced to other types and when it cannot be coerced, illustrated by both list and tuple inputs.

Client Library Samples

This sample category demonstrate how to work with the StreamBase Client libraries to create client programs.

Topic Description
Buffering Sample Highlights the tuple buffering options for producer or enqueue clients.
Client Sample Provides sample enqueue and dequeue clients; that is, enqueuing (adding) tuples onto a named stream, and dequeuing (reading) processed tuples from a named stream. The samples include both Java or C++ sources.
Client Status Monitor Sample Demonstrates how to monitor the status of StreamBase clients using the Java Client API. The sample provides a Java application that runs a StreamBase client and tracks its connection status in four ways.
ReadTable API Sample Provides sample Java code that illustrates the new StreamBaseClient.ReadTable() method, which is used to display all or a specified number of rows from a Query Table.
TableOperator Java Client API Sample Provides sample Java code that illustrates the use of methods in the TableAccessor class, which lets Java operators and adapters interact with Query Tables. In particular, this class lets you insert and replace rows, read a single row based on the primary index, perform more complex multi-row queries, delete rows, and truncate entire tables.

Data Construct and Operator Samples

The operator sample group illustrates all StreamBase operators in the Palette view, one sample per operator. The JDBC Query sample requires site-specific configuration and is thereby provided in a separate sample.

Topic Description
Operator Sample Group Operator Sample Group. Provides one small EventFlow module for each operator in the Palette view in StreamBase Studio.
Capture Fields for Generic Data Store Sample Demonstrates how to use a capture field in the schema of a Query Table to make that table reusable with variable schemas in different copies of its containing module.
Capture Fields and Parent Schemas Sample Demonstrates how to use capture fields in conjunction with parent schemas to create a reusable module that can match orders for FX trading in one instance and can match orders for Equities trading in another copy of the identical, unchanged module. The module uses abstract schemas for its input stream and Query Table that become concrete schemas in actual use.
Data Point To Schema Operator Sample Demonstrates the Data Point To Schema operator.
Decision Table Operator Sample Demonstrates the decision table operator.
Field Gather Operator Samples Demonstrates the Field Gather operator.
Field Grids Sample Demonstrates how to avoid or resolve conflicts, ambiguities and typechecking errors related to including and adding fields with names that conflict and related usage of declared local variables.
FTP Operator Sample Shows how to use the FTP operator to run simple FTP client commands programmatically.
Function Data Type Sample Shows how to define EventFlow functions in operators and streams.
JDBC Table Sample Demonstrates the Query operator when associated with a JDBC Table data construct. The EventFlow application in this sample cannot pass typechecking until you configure the sample to connect to an actual JDBC database at your site.
JSON to Tuple and Tuple to JSON Operator Sample Demonstrates the Tuple to JSON and JSON to Tuple operators.
Matrix Operator Samples Demonstrates the Matrix operator.
Runtime Schema Cast Operator Sample Demonstrates the Runtime Schema Cast operator, which casts its input schema to its configured target output schema at run time.
XML to Tuple and Tuple to XML Operator Sample Demonstrates the Tuple to XML and XML to Tuple operators.
Data Science Operator Sample Group Data Science Operator Sample Group. Provides one small EventFlow module for each operator in the Palette view in StreamBase Studio.

Extending StreamBase Samples

You can extend StreamBase by writing your own custom clients, functions, embedded adapters, and Java operators, as illustrated in this category of samples.

Topic Description
Custom Java Simple Function Sample Shows how to provide a custom simple function written in Java.
Custom Java Aggregate Function Sample Shows how to provide a custom aggregate function written in Java.
Custom Embedded Adapter Sample Shows how to provide a custom adapter written in Java.
Custom Java Operator Sample Shows how to provide a custom operator written in Java. Shows a simple StringCase class that extends the StreamBase Client API's Operator class.
Custom Java Operator Complex Types Sample Shows how to create a Java operator to retrieve fields and values from nested structures in a tuple, such as lists of integers or lists of tuples that contain a double.
Configuration File Access Sample Shows how a custom Java operator or embedded adapter can access alternative values for properties from a StreamBase configuration file.
Cluster Topic Publisher and Subscriber Adapters Sample Shows how to use the Cluster Topic Publisher and Subscriber adapters to shares tuples across fragments and nodes on a cluster via topics.
Data Directory Sample Illustrates how to use the dataAreaPath property in a HOCON configuration file.
Feed Simulation Conditional Field Sample Shows how to generate fields for feed simulations whose values depend on the contents of other fields.
Feed Simulation Custom Reader Sample Shows how to provide custom file reader functionality to the feed simulation mechanism.
Microsoft .NET Operator Sample Shows how to use the Microsoft .NET operator to integrate .NET code into your StreamBase application.
Calling an Embedded StreamBase Server from Java Shows how to run an embedded StreamBase Server from Java.
Logging Samples Logging in a custom operator compared with using the Log adapter.

IoT Adapter Samples

This sample category describes adapters appropriate for oil and gas exploration applications.

Topic Description
ETP Adapter Sample Shows how to use the ETP adapters.
OPC UA Adapter Sample Shows how to use the OPC UA adapters.
OSI PI Adapter Sample Shows how to use the OSI PI adapters.
WITSML Adapter Samples Shows how to use the Spotfire WITSML operators to connect to a WITSML data store from your StreamBase application.
WITS Adapter Samples Shows how to use the Spotfire WITS operators to get data from a WITS serial comm port connection.

Large Data Storage and Analysis

This sample category describes adapters and operators that connect StreamBase providers of so-called big data solutions.

Topic Description
Avro Operator Sample Demonstrates the Tuple to Avro and Avro to Tuple operators.
Amazon S3 File System Access via HDFS Adapters Amazon S3 file system access using the HDFS File Reader and File Writer adapters.
Apache Cassandra Operator Sample Shows how to use the Apache Cassandra operators to connect to a Cassandra cluster and exchange tuples with it from your StreamBase application.
Apache Kudu Operator Sample Shows how to use the Apache Kudu operators to connect to a Kudu cluster and exchange tuples with it from your StreamBase application.
HBase Operator Samples Describes how to run the HBase Operator sample applications, which illustrates how to use the HBase operators when connecting a StreamBase application to an Apache HBase server.
HDFS File Writer and File System Adapter Sample Apache Hadoop Distributed File System (HDFS) File Writer and File System adapter
HDFS Binary File Reader/Writer Adapter Sample HDFS Binary file input and output adapters
HDFS CSV File Reader Input Adapter Sample HDFS CSV File input adapter
HDFS CSV File Writer Output Adapter Sample HDFS CSV File output adapter
HDFS File Reader Input Adapter Sample HDFS File Reader input adapter
HDFS File Writer Output Adapter Samples HDFS File Writer output adapter
HDFS Regular Expression File Reader Input Adapter Sample HDFS Regular Expression File input adapter
HDFS XML File Writer Output Adapter Sample HDFS XML File output adapter
H2O Operator Sample Demonstrates the H2O operator.
JPMML Operator Sample Demonstrates the PMML operator.
Python Operator Samples Demonstrates the Python operator.

Native Database Connectivity Adapter Samples

This sample category illustrates how to use the adapters that provide connectivity to certain databases using high performance database-native drivers provided by the database vendor, as opposed to standard JDBC connectivity.

Topic Description
Database Change Data Capture Input Adapter Sample Change Data Capture
Oracle CDC LogMiner Adapter Sample Oracle CDC LogMiner

Network Samples

This sample category describes adapters appropriate for networking applications.

Topic Description
IPFIX Adapter Samples Show the use of the IPFIX input adapter.
LDAP Client Adapter Sample Shows how to use the LDAP Client adapters to connect to an LDAP server from your StreamBase application.

Other TIBCO Product Connectivity Samples

This sample category describes adapters and operators that connect StreamBase to other members of the TIBCO product family.

Topic Description
TIBCO ActiveMatrix BPM Operator Sample Shows how to use the TIBCO ActiveMatrix BPM operator to connect to a ActiveMatrix BPM server and call REST API services with it from your StreamBase application.
TIBCO ActiveSpaces Operator Sample Shows how to use the TIBCO ActiveSpaces operators to connect to a datagrid and retrieve and modify rows from your StreamBase application.
TIBCO BusinessEvents Fraud Detection Sample Demonstrates how to use TIBCO BusinessEvents' StreamBase channel to exchange messages between the two products.
Spotfire Automation Services Adapter Samples Spotfire Automation Services output adapter
TERR Operator Samples Shows how to invoke the TERR operators from a StreamBase module.
TIBCO FTL Adapter Sample Demonstrates the TIBCO FTL input and output adapters.
TIBCO eFTL Adapter Sample TIBCO eFTL publish and subscribe adapters
TIBCO LogLogic Query Adapter Samples Demonstrates how to perform queries against the TIBCO Log Log Unity server.
TIBCO Rendezvous Adapter Sample Demonstrates the TIBCO Rendezvous input and output adapters.

Spotfire Streaming Market Data Adapter Samples

Topic Description
ActivFeed Input Adapter Sample Activfeed input adapter
Bloomberg Server API and B-Pipe Adapter Samples Bloomberg Server API/Managed B-Pipe input adapter
BM&FBOVESPA UMDF Input Adapter Sample B3 UMDF input adapter
CME MDP3 Adapter Sample CME Market Data Platform input adapter
Deutsche Bank Autobahn FX Trading System Adapter Sample Deutsche Bank Autobahn FX Trading System adapter
Digitec D3 Streaming Interface Adapter Sample Digitec D3 Streaming Interface adapter
EBS Live XML Input Adapter Sample EBS Live XML adapter
Exegy Adapter Sample Exegy Input and Monitoring adapters
FIX Adapter Sample FIX adapter
FXall Relationship Trading Provider Adapter Sample FXall Relationship Trading Provider adapter
GAIN GTX Adapters Sample GAIN GTX adapter
Hotspot FX Trading System Adapter Sample Hotspot FX Trading System adapter
Hotspot Itch Input Adapter Sample Hotspot Itch Trading System adapter
IEX Adapter Samples IEX Data adapter
Morningstar Quotes Feed Adapter Sample Morningstar Quotes Feed adapter
TREP-RT Subscribing Input Adapter Sample Thomson Reuters Enterprise Platform for Real-Time Subscribing input adapter
TREP-RT Publishing Output Adapter Sample Thomson Reuters Enterprise Platform for Real-Time Publishing output adapter
TREP-RT Contribution Output Adapter Sample Thomson Reuters Enterprise Platform for Real-Time Contribution output adapter
Wombat MAMA Input Adapter Sample Wombat Subscribing input adapter
Wombat MAMA Output Adapter Sample Wombat Publishing output adapter

Spotfire Streaming Messaging Adapter Samples

Topic Description
Apache Kafka Adapter Samples Apache Kafka input and output adapters
Apache Pulsar Adapter Sample Apache Pulsar adapters
Diameter Protocol Client and Server Adapter Samples Diameter Adapters
IBM WebSphere MQ Adapter Sample IBM WebSphere MQ input and output adapters
MQTT Client Publish And Subscribe Samples MQTT Client subscribe and publish adapters
JMS and EMS Adapter Samples JMS and TIBCO EMS adapters
JMX Adapter Sample JMX adapters
RabbitMQ Adapter Samples RabbitMQ input and output adapters
Wall Street Systems Adapter Sample Wall Street Systems input and output adapters

Spotfire Streaming Standard Adapter Samples

Topic Description
Artifact Management Server Adapter Sample Adapter connecting to Artifact Management Server
Binary File Reader and Writer Adapter Sample Binary file input and output adapters
Bidirectional Socket Input/Output Adapter Samples Bidirectional Socket input/output adapter
Bidirectional BLOB Socket Input/Output Adapter Samples Bidirectional BLOB Socket input/output adapter
Bidirectional CSV Socket Input/Output Adapter Samples Bidirectional CSV Socket input/output adapter
Bidirectional Length Based Socket Adapter Samples Bidirectional Length Based Socket input/output adapter
Bidirectional JSON Socket Input/Output Adapter Samples Bidirectional JSON Socket input/output adapter
Bidirectional Serialized Tuple Socket Input/Output Adapter Samples Bidirectional Serialized Tuple Socket input/output adapter
CSV File Reader Input Adapter Sample CSV File input adapter
CSV File Writer Output Adapter Sample CSV File output adapter
CSV Socket Reader Input Adapter Sample CSV Socket input adapter
CSV Socket Writer Output Adapter Sample CSV Socket output adapter
Email Sender Output Adapter Sample File Monitor input adapter
Feed Simulation Input Adapter Sample Feed Simulation input adapter
File Monitor Input Adapter Sample File Monitor input adapter
File Reader Input Adapter Sample File Reader input adapter
File Template Sample File Template
File Writer Output Adapter Samples File Writer output adapter
Google Protocol Buffers Sample Google Protocol Buffers input and output adapters
HTTP Client Input Adapter Samples HTTP Client input adapter
LiveView Adapters Sample LiveView adapters sample
Log Output Adapter Sample Logging output adapter
Once Input Adapter Sample Once input adapter
Google Protocol Buffers Sample Spotfire Output/input Adapter for Google Protocol Buffers
Regular Expression File Reader Input Adapter Sample Regular Expression File input adapter
Regular Expression Socket Reader Input Adapter Sample Regular Expression Socket input adapter
RSS Reader Input Adapter Sample RSS Reader input adapter
RTPP Adapter Sample RTPP adapter
SMPP Adapter Sample SMPP adapter
SNMP Input Adapter Sample SNMP input adapter
Syslog Input Adapter Sample Syslog input adapter
Salesforce Streaming API Adapter Sample Salesforce adapter. Demonstrates listening to streaming events from the Salesforce platform based on a given topic.
Slack Adapters Sample Slack adapters
StreamBase to StreamBase Input Adapter Sample StreamBase-to-StreamBase input and output adapters
Spotfire Streaming Monitor Adapter Sample Spotfire Streaming Monitor input adapter
Task Scheduler Adapter Samples Task Scheduler adapter
TensorFlow Adapter Sample TensorFlow adapter
Twitter Adapter Sample Twitter adapter
UDP Unicast Adapter Sample UDP Input and Output Adapter Sample
UDP Multicast Mode Adapter Sample UDP Multicast Mode Input and Output Adapter Sample
Web Reader Input Adapter Samples Web Reader input adapter
Web Server Request And Response Adapter Samples Web Server Request Response adapters
Web Streams Adapter Sample Web input and output adapters that enqueue and dequeue data using REST input requests and WebSocket clients connected for output.
WebSocket Client Read and Write Samples WebSocket Client read and write adapters
Wikimedia EventStreams Adapter Sample Wikimedia EventStreams adapter
XML File Writer Output Adapter Sample XML File output adapter
XML Over HTTP Output Adapter Sample XML-over-HTTP output adapter

Spotfire Streaming Trade Execution Adapter Samples

Topic Description
CME Order Routing Adapter Sample Shows how to use the Chicago Mercantile Exchange iLink Order Entry platform and exchange messages with it from your StreamBase application.
Deutsche Bank Autobahn FX Trading System Adapter Sample Deutsche Bank Autobahn FX Trading System adapter.
FIX Adapter Sample FIX adapter.
FXall Relationship Trading Provider Adapter Sample FXall Relationship Trading Provider adapter.
GAIN GTX Adapters Sample GAIN GTX adapter.
Hotspot FX Trading System Adapter Sample Hotspot FX Trading System adapter.