Loading Samples in Studio

Loading Samples into StreamBase Projects

To load a sample into StreamBase Studio:

  1. If you currently have one of the Welcome pages open in Studio, click the Workbench icon (circled in red) to close the Welcome page and open the SB Authoring Perspective.

  2. From Studio's top-level menu, select File>Load StreamBase Sample.

    You can resize the dialog as needed.

  3. The dialog first opens with all categories collapsed, as shown above.

    To locate a sample of interest, you can:

    • Type a search string in the type filter text field.

    • Open the categories of interest and browse each list. (Note that some adapter samples are listed in more than one category.)

  4. Select one or more samples from the Load Sample Projects dialog. Hold the Ctrl key (Windows) or command key (macOS) while clicking to make a multiple selection.

  5. Specify whether or not to open the README.html or Eclipse Cheat Sheet (if provided) for the selected samples. Studio remembers your setting of this option.

  6. When opening a Live Datamart sample, specify whether to open the LiveView Project Viewer for the selected samples.

  7. Click OK.

The samples you load have the following characteristics:

  • The Load Sample Projects dialog remembers the collapsed or expanded state of the category lists.

  • StreamBase Studio creates a separate project for each sample you load.

    • Exception: for the Operator sample group, Studio creates a single project and all the individual operator's sample modules are imported into the same project folder.

  • You can reload any sample any time. If your workspace already has a copy of that sample, Studio creates a new copy, appending a number to the new copy's project folder name. This lets you load several copies of the same sample to experiment in different ways.

  • If a sample contains a custom function or client application, Studio automatically loads those and any specified configuration settings onto StreamBase Server when you run the sample.

  • If Studio loads a JAR file as part of a sample, it automatically adds the StreamBase Client API to the project's Java build path. The usual practice, however, is to provide Java source files in the project's java-src folder, which Studio automatically builds after loading the sample's project.

Sample Locations

StreamBase sample files are initially installed in the sample subdirectory of the StreamBase installation directory. See Default Installation Directories for that location for your platform.

However, TIBCO StreamBase strongly recommends not trying to load or run a sample from its initially installed location.

When you load a sample into StreamBase Studio, Studio creates a project folder for that sample in your Studio workspace, and copies the sample project's files there. TIBCO StreamBase strongly recommends that you use the workspace copy of the sample, especially on platforms where you may not have write access to the installation directory. Even when running a sample from the StreamBase Command Prompt, use the Studio workspace copy of the sample.

See Default Installation Directories for the location of your Studio workspace for your platform.

Rebuilding Samples on Windows

A number of StreamBase samples, such as client and buffering, have C++ and Java code that can be modified and rebuilt. In order to rebuild the C++ executables on Windows, you must have one of the supported Microsoft Visual Studio versions installed as described on Supported Platforms.