udf

Control the user-defined function (UDF) features of Refinery

refinery udf option

Options: --add --import --reload --delete --info --export --modify

--add --funcname fnn --funcType fnt --file fpath
    [--description [dpath|string]] [--language lang]

Add a new UDF named fnn of type fnt, defined in fpath, with optional description in string or at dpath, coded in language lang.

--modify --funcname fnn --file fpath
    [--description [dpath|string]] [--language lang]

Update UDF fnn from file at fpath, with optional description in string or at dpath, coded in language lang.

--delete --funcname fnn

Delete UDF fnn.

--info [--funcname fnn]

List information (including function type, code and description) on all UDFs available or on UDF fnn only.

--export [--dir path]

Package up entire contents of UDF directory into an installable TGZ in current working directory, or at path.

--import --file path

Install a UDF package from TGZ at path.

--reload sync

Force-load any underlying UDF directory changes into UDF processes. Done automatically by CLI operations.

The sync input for reload adds a synchronous command line response of the status of the reload call. On failure, outputs exit code 22.

Example: adding realtime UDF qUDF:

refinery udf --add --funcName qUDF --funcType realtime --file qUDF.q

and the trigger function to accompany it

refinery udf --add --funcName qTriggerFunc --funcType trigger --file qTriggerFunc.q

Note the funcType of an initialization function is realtime.

refinery udf --add --funcName qInitFunc --funcType realtime --file qInitFunc.q

UDFs can also be managed using the Server API.


Real-time UDF configuration