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
fnnof typefnt, defined infpath, with optional description instringor atdpath, coded in languagelang. --modify --funcname fnn --file fpath
[--description [dpath|string]] [--language lang]-
Update UDF
fnnfrom file atfpath, with optional description instringor atdpath, coded in languagelang. --delete --funcname fnn-
Delete UDF
fnn. --info [--funcname fnn]-
List information (including function type, code and description) on all UDFs available or on UDF
fnnonly. --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.