How to Parameterize the Path to a Feed Simulation Data File

How to Parameterize the Path to a Feed Simulation Data File

book

Article ID: KB0072458

calendar_today

Updated On:

Products Versions
TIBCO Streaming 10.6

Description

In some cases, you may want to run a Feed Simulation in multiple OS environments (e.g. Windows and Linux). When using the Data File Generation Method for your Feed Simulation, the full path to the Feed simulation data file will be different in each environment.

On Windows, the path might look like:
 
 C:/data/DataFile.csv

On Linux/Mac, the path might look like:
 
 /home/user/data/DataFile.csv

However, this path cannot be set with a Module/Global Parameter in the *.sbfs Feed Simulation file.

Follow the steps below to effectively parameterize the path to your Feed Simulation data file ( DataFile.csv).

Issue/Introduction

Provides guidance on using the deploydirectories node installation parameter to effectively parameterize the path to a Feed Simulation data file.

Resolution

Use the deploydirectories node installation parameter, as noted in the Help under Home > EP Commands > epadmin and epdev References > epadmin-node(1) > (sub-heading) epadmin install node > (sub-heading) install Command Parameters.

First, right-click on your *.sbfs Feed Simulation file in the Studio Project Explorer, select Open With > Text Editor, and set the DataSourceURI property to ' DataFile.csv' (i.e. the name of your data file, without its qualifying path).

data file

If using the Feed Simulation adapter, set the Feed Simulation File to the name of your *.sbfs file. For example..

feedsim adapter props

Note the "cannot be found" error, which is expected, since Studio does not yet know the full path to DataFile.csv. Although your *.sbapp will not successfully typecheck in Studio, it should run correctly if you specify the deploydirectories node installation parameter, pointing to a valid path on the system where DataFile.csv is located. This can be done in a Run Configuration.

Windows example:

windows run config


Linux/Mac example:

nixmac deploy dir

The deploydirectories parameter can also be set when running from the command line, using epadmin:

Windows example:
 
 epadmin install node --nodename=feed.sim --nodedirectory=C:/node --application=C:/apps/app-archive.zip --deploydirectories=C:/data/

Linux/Mac example:
 
 epadmin install node --nodename=feed.sim --nodedirectory=/home/user/node --application=/home/user/apps/app-archive.zip --deploydirectories=/home/user/data/

This allows you to effectively parameterize the Feed Simulation data file location for multiple environments.