ALTER EXTERNAL SCRIPT

External scripts can be re-configured using the using ALTER in SQL syntax.

Usage

ALTER EXTERNAL SCRIPT script_name SET argument_string

Notes

The argument-string is one of the following:

  • REQUIRES n {MB|GB} RAM - to change Maximum RAM per script invocation
  • LIMIT n THREADS [PER NODE] - to control number of script invocations
  • NO THREADS LIMIT -
  • [NOT] RUN ON [{node-list|ALL}] - change where the scripts run to a subset of nodes defined by node-list or ALL nodes
  • {ISOLATE|SEPARATE|MIX|DEFAULT} PARTITIONS - control the data flow and parallelism.

If these are not specified when a script is created then defaults are obtained from the script environment being used. If these in turn are not set then SET NO THREADS LIMIT, REQUIRES 0 GB RAM, RUN ON ALL and SET DEFAULT PARTITIONS are used.

Examples

To change the maximum amount of RAM per invocation:

ALTER EXTERNAL SCRIPT script_name SET REQUIRES 1 GB RAM
ALTER EXTERNAL SCRIPT script_name SET REQUIRES 500 MB RAM

To reset the maximum amount of RAM back to use the default RAM set in the script environment:

ALTER EXTERNAL SCRIPT script_name SET REQUIRES 0 GB RAM

For changing the number of invocations:

ALTER EXTERNAL SCRIPT script_name SET LIMIT 1 THREADS
ALTER EXTERNAL SCRIPT script_name SET LIMIT 1 THREADS PER NODE

To reset the number of invocations back to using the default number of invocations set in the script environment:

ALTER EXTERNAL SCRIPT script_name SET NO THREADS LIMIT

For configuring the partitioning strategy:

ALTER EXTERNAL SCRIPT name SET ISOLATE PARTITIONS;
ALTER EXTERNAL SCRIPT name SET SEPARATE PARTITIONS;
ALTER EXTERNAL SCRIPT name SET MIX PARTITIONS;
ALTER EXTERNAL SCRIPT name SET DEFAULT PARTITIONS;

To change the nodes that external scripts are invoked:

ALTER EXTERNAL SCRIPT name SET RUN ON node;
ALTER EXTERNAL SCRIPT name SET NOT RUN ON nodes;
ALTER EXTERNAL SCRIPT name SET RUN ON ALL;