Name

findInFeaturesFile — This script will search through a 'features.

Syntax

void findInFeaturesFile ( String trackfolder , String regex , String outfile ) 

The command has the following arguments:

trackFolder

The fully qualified path to the track folder where the 'features.csv' file is located.

regex

The regular expression to be used to search for attributes.

outfile

The name of the output file to store the results into.

Description

This script will search through a 'features.csv' file looking for feature attributes that match with the specified regular expression. While searching, the script will note which tracks contain the matching attributes, and which do not. After the search is over the script will print out the track labels and names for those tracks which have no matching attributes.

This script is useful to find track that are missing attribute information. Here is an example that search for track that do not have yield curves:

findInFeaturesFile("f:/Projects/OMNR/3w_commodity/tracks_allguide_May26_newYield",
                   "feature.Yield.",
                   "checkYield.csv");

This script can be run from within Patchworks, or it can be run using the 'Console' application that is availble from the 'Data Prep' section of the Application Launcher.