Batch (Non-Interactive) Execution of Spotfire Miner Worksheets in Spotfire S+ Server

DESCRIPTION:

Executes a Spotfire Miner worksheet using the specified arguments and places worksheet execution messages in an output file.

Use this feature only for running Spotfire Miner in batch mode on the Spotfire S+ Server. It does not work with desktop installations of Spotfire Miner or Spotfire S+. It must be run from a UNIX shell prompt.

USAGE:

Splus CMD IMBATCH [options] worksheetfile

REQUIRED ARGUMENTS:

worksheetfile
Name of the Spotfire Miner worksheet file to be executed.

OPTIONAL ARGUMENTS:

-h | --help
Prints this message and quits.
--parameter name=value
One parameter in name=value format.
--parameters parameters
Parameters in comma-separated list of name=value pairs. (The entire list must be in single quotes, while each value must be in double quotes; the name/value pair list can contain no spaces. For example: 'n1="v1",n2="v2"'.)
--pfile|parameter.file file
Name of file containing parameters values in Java properties format.
--headless
Enable headless mode.
--invalidate[.nodes] nodes
Worksheet nodes to invalidate before executing the worksheet. The default is "all".
--runto[.nodes] nodes
Worksheet nodes to "run to" when executing the worksheet. nodes can be "all" for all nodes, "none" for no nodes, or a comma- separated list of integers specifying nodes numbers: "3,5,8". The default is "all".
--wsd directory
Name of the worksheet directory to use. (If not specified, a temporary directory will be created in the current working directory.)
--logfile file
Write detailed Spotfire Miner log messages to file.
--appendlog
Append log messages to existing file (default is to overwrite).
--cwd directory
Optional S-PLUS argument. Change to this directory before doing anything else.
--output file
Optional S-PLUS argument. Send output to file (default is <basename worksheetfile>_out.txt). <basename worksheetfile> is the worksheetfile name stripped of possible directory path and extension.
--work directory
Optional S-PLUS argument. Use directory for working database (where=1), making it if needed. If --work is not specified, a new randomly-named directory is created for the working database.
--noclean
Optional S-PLUS argument. Do not remove the temporary files or directories created by IMBATCH: the S-PLUS working database, the worksheet directory, and the temporary input file.
--newworkparent directory
Optional S-PLUS argument. Directory in which to make the new, randomly-named working database (default=.).
--echo
Optional S-PLUS argument. Echo command lines to output (sets options(echo=T)).
--verbose
Optional S-PLUS argument. Echo verbose logging information to output (sets options(verbose=T)).
--background
Optional S-PLUS argument. Run S-PLUS in the background (returning immediately).
--vanilla
Optional S-PLUS argument. Do not run user-defined startup scripts or functions and create a temporary working database ( --work is ignored).

SIDE EFFECTS:

Running IMBATCH creates the following items in the current working directory:
(1) A randomly-named, temporary working Spotfire S+ database.
(2) A randomly-named, temporary worksheet directory.
(3) A temporary input file containing a call to bd.run.iminer.worksheet().
(4) A file containing the S-PLUS output.

The first three items are automatically deleted after execution unless the --noclean argument in set. Or a permanent Spotfire S+ database can be specified with the --work argument, and a permanent worksheet directory can be specified by the --wsd argument.

The output file contains the status of executing the worksheet nodes, including error messages, if an error occurred.

DETAILS:

Worksheet parameters can be specified in three ways:
(1) using the --parameter argument to set one parameter, --parameter NROWS=70
(2) using the --parameters argument to set one or more parameters, --parameters 'IN="fuel.txt",OUT="fuel.xls"'
(3) using the --parameter.file argument to specify the name of a file containing parameter settings, --parameter.file rwparam.properties

A combination of these methods can be used when invoking IMBATCH.

NOTE:

S-PLUS is case sensitive. The word IMBATCH must be in all capital letters. This must be run from a UNIX shell prompt to execute. IMBATCH follows the code conventions of the single dash or double dash preceding single character or character string options, respectively. That is, when you specify an option, if that option is specified with a single character (for example, h for help), use a single dash (-): -h. If the option is specified with a character string (for example, help for help), use a double dash (--): --help.

Notice that the --logfile and --appendlog arguments are not the same as those used with the SBATCH and START commands. If --logfile is set when invoking IMBATCH , detailed Spotfire Miner information will be written as the worksheet is executed, not Spotfire S+ messages.

WARNING:

Execution begins immediately after IMBATCH is invoked. If you are on a UNIX system, you might want to put the IMBATCH job in the background or use the UNIX at (or chron) command to delay execution.

SEE ALSO:

, , .

EXAMPLES:

# execute the worksheet "rwparam.imw" using the parameters defined
# in the file "rwparam.properties" using the worksheet directory
# "rwparam.wsd" located in the current working directory (or it will
# be created if it does not yet exist)
Splus CMD IMBATCH --pfile rwparam.properties --wsd rwparam.wsd  rwparam.imw

# specify all parameters on the command line
Splus CMD IMBATCH --parameters 'IN="fuel.txt",OUT="fuel.xls"' --parameter NROW=150 rwparam.imw
# where in the worksheet file, for example, %IN% is specified for File Name and 
# %NROW% for End Row in a Read File node, and %OUT% is specified for File Name 
# in a Write File node.