Invoke external scripts

Usage

External scripts are invoked using an SQL query. There are a number of different syntax combinations. The most straightforward is:

EXTERNAL SCRIPT script-name
[PARAMETERS param-name1=value1, ...
[FROM (sql-input-query)]

Notes

The PARAMETERS are an optional list of values that can be passed into all the external script invocations via environment variables. See the custom parameters page for more details.

The sql-input-query can be any SQL query whose results exactly match the data-type definitions in the RECEIVES statement in the external script creation statement. If the data-type is absent in the RECEIVES statement then the corresponding data type from the sql-input-query results will be used to define the data-types and must match what is expected in the SCRIPT code used in the external script creation statement.

If there is no RECEIVES statement in the external script creation then the script does not receive any data and no sql-input-query is required.

Examples: