- Index

< Previous |  | Next >

# 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 Load StreamBase Sample dialog.

Topic | Description
--- | ---
Loading Samples in Studio | Using the File → Load StreamBase Sample dialog.
TIBCO StreamBase Component Exchange | Locating more examples in the TIBCO StreamBase Component Exchange.

## 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.
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.
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.

## 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
--- | ---
Avro Operator Sample | Demonstrates the Tuple to Avro and Avro to Tuple operators.
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.
Decision Table Operator Sample | Demonstrates the decision table 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 execute simple FTP client commands programmatically.
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.
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.
Salesforce Streaming API Adapter Sample | Demonstrates listening to streaming events from the Salesforce platform based on a given topic.
XML to Tuple and Tuple to XML Operator Sample | Demonstrates the Tuple to XML and XML to Tuple operators.

## 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
--- | ---
Function Data Type Sample | Shows how to define EventFlow functions in operators and streams.
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.
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.
Configuration File Access Sample | Shows how to access elements from a configuration file from an operator or and adapter, allowing instances of the component to be easily and reliably configured.
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.
Data Directory Sample | Describes how to use the `dataAreaPath` configuration property within a configuration file of type HOCON.

## Large Data Storage and Analysis

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

Topic | Description
--- | ---
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.
Spark MLlib Operator Sample | Demonstrates the Spark 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
Vertica Load Adapter Sample | Vertica Load adapter

## 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.
TIBCO Spotfire Automation Services Adapter Samples | TIBCO Spotfire® Automation Services output adapter
TERR Operator Samples | Shows how to invoke the TIBCO Enterprise Runtime for R (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.

## Petroleum Industry Adapter Samples

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

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

## StreamBase 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 | BM&FBOVESPA UMDF input adapter
CME MDP3 Adapter Sample | CME Market Data Platform input adapter
Deutsche Bank AutobahnFX Trading System Adapter Sample | Deutsche Bank AutobahnFX 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
Morningstar Quotes Feed Adapter Sample | Morningstar Quotes Feed adapter
TBF Input Adapter Sample | TBF input adapter
Thomson Reuters Enterprise Platform for Real-Time Subscribing Input Adapter Sample | Thomson Reuters Enterprise Platform for Real-Time Subscribing input adapter
Thomson Reuters Enterprise Platform for Real-Time Publishing Output Adapter Sample | Thomson Reuters Enterprise Platform for Real-Time Publishing output adapter
Thomson Reuters Enterprise Platform for Real-Time Contribution Output Adapter Sample | Thomson Reuters Enterprise Platform for Real-Time Contribution output adapter
Thomson Reuters Velocity Analytics Samples | Sample group for the Thomson Reuters Velocity Analytics Broadcast Server input adapter, the Velocity Analytics UTSS output adapter, and query operations against the Velocity Analytics time series data store.
Wombat MAMA Input Adapter Sample | Wombat Subscribing input adapter
Wombat MAMA Output Adapter Sample | Wombat Publishing output adapter

## StreamBase Messaging Adapter Samples

Topic | Description
--- | ---
29West LBM Adapter Sample | 29West LBM input and output adapters
Apache Flume Input and Output Adapters Sample | Apache Flume input and output 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 | EMS and JMS adapters
Apache Kafka Adapter Samples | Apache Kafka input and output adapters
RabbitMQ Adapter Samples | RabbitMQ input and output adapters
Wall Street Systems Adapter Sample | Wall Street Systems input and output adapters

## StreamBase Standard Adapter Samples

Topic | Description
--- | ---
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
Diameter Protocol Client and Server Adapter Samples | Diameter Adapters
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
Email Sender Output Adapter Sample | E-mail sending output adapter
Feed Simulation Input Adapter Sample | Feed Simulation input adapter
HTTP Reader Input Adapter Sample | HTTP Reader input adapter
IRC Reader Input Adapter Sample | IRC Reader input adapter
LiveView Adapters Sample | LiveView adapters sample
Log Output Adapter Sample | Logging output adapter
Once Input Adapter Sample | Once input adapter
POP3 Reader Input Adapter Sample | POP3 Reader input adapter
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
SMTP Reader Input Adapter Sample | SMTP (E-mail) Reader input adapter
SNMP Input Adapter Sample | SNMP input adapter
Syslog Input Adapter Sample | Syslog input adapter
Task Scheduler Adapter Samples | Task Scheduler Adapter
Twitter Adapter Sample | Twitter Adapter
StreamBase to StreamBase Input Adapter Sample | StreamBase-to-StreamBase input and output adapters
StreamBase Monitor Adapter Sample | StreamBase Monitor input adapter
UDP Input and Output Adapter Sample | UDP Input and Output Adapter Sample
UDP Multicast Mode Input and Output Adapter Sample | UDP Multicast Mode Input and Output Adapter Sample
Web Reader Input Adapter Samples | Web Reader input adapter
Web Server Request And Response Input and Output Adapter Samples | Web Server Request Response adapters
Web Streams Adapter Sample | Web Streams Input Output adapters
WebSocket Client Read and Write Samples | WebSocket Client Read and Write adapters
XML File Writer Output Adapter Sample | XML File output adapter
XML Over HTTP Output Adapter Sample | XML-over-HTTP output adapter

## StreamBase 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 AutobahnFX Trading System Adapter Sample | Deutsche Bank AutobahnFX 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.

## TIBCO Live DataMart Samples

Sample Folder Name | Description
--- | ---
LiveView Adapters Sample | Shows the use of the TIBCO LiveView Query, Delete, Publish, Ready and Table Create Drop adapters
liveview/sample/lv-sample-activespaces | LiveView connecting to an ActiveSpaces Metaspace
liveview/sample/lv-sample-alerting-advanced | Shows advanced alerting features with preconfigured alert rules
liveview/sample/lv-sample-auth | Shows how to use LiveView authentication
liveview/sample/lv-sample-helloliveview | Shows a simple Hello World application
liveview/sample/lv-sample-java-clientapi | Using the LiveView Java Client API
liveview/sample/lv-sample-javascript | Creating web applications with the LiveView JavaScript API
liveview/sample/lv-sample-jdbc-table | Using LiveView with a JDBC table
liveview/sample/lv-sample-minimal | Shows the minimum configuration to start the LiveView server
liveview/sample/lv-sample-preprocessor | Configuring a preprocessor
liveview/sample/lv-sample-publisher | Shows an embedded publisher application
liveview/sample/lv-sample-sbd-table | Using LiveView with a StreamBase Query Table table back end
liveview/sample/lv-sample-services-only | Shows a LiveView server without a data layer back end, but that connects to other LiveView server back ends
liveview/sample/lv-sample-transform | Shows how to configure a data transformation application