CREATE SCRIPT ENVIRONMENT

In order to utilize none SQL code on Kognitio an external script environment must be created on the system. It is a pre-requisite that the binary to be used must be identically installed, in the same location, on all nodes that can be used in the processing.

Usage

CREATE SCRIPT ENVIRONMENT script-environment
COMMAND 'execution-command'
[INPUT 'input-attribute-list']
[OUTPUT 'output-attribute-list']
[{LIMITS n THREADS | LIMITS m THREADS PER NODE | NO THREADS LIMIT}]
[REQUIRES k {MB | GB} RAM]
[{[NOT] RUN ON {NODES('node-name', ...) | ALL}}]

Notes

The execution-command string contains the Linux command to be executed by each external script invoked by Kognitio when script-environment is utilised. This typically contains the full path to the binary and any command line options that need to be applied to the binary for execution by Kognitio. See the script environment overview for some examples on creating script environments for bash, python and R.

All other syntax in the script environment creation statement (INPUT, OUTPUT, LIMITS, REQUIRE and RUN ON) is optional. These configure how the scripts using the environment are invoked. Any of these optional configuration settings are used by all external scripts using script-environment unless the same configuration is set specifically in the creation or alteration of an individual external script.

For more details on what each of these do see the section on creating external scripts.