IDA DEPLOYUDX command
The IDA DEPLOYUDX CLPPlus command builds a library and registers one UDX that uses that library.
- Creates a project directory on the database server under user home and uploads the compressed file containing the UDX source files to the project directory.
- Unpacks the compressed file into the project directory.
- For a UDX written in C++, compiles all source files to create object files.
- For a UDX written in C++, links the object files to create a library file.
- Promotes the library file and other files that are used by the library to the release directory.
- Registers one UDX that uses the library file.
You can specify the parameters that control the deployment action in the command string, in an IDA parameter file, or in both (see IDA parameter file).
Invocation
You must run this command from the CLPPlus interface.
Authorization
None.
Required connection
CLPPlus must be connected to the database.
Command syntax
Command parameters
- PARAMFILE
- The name of an IDA parameter file that determines the default values of any parameters that are not explicitly specified for this command (see IDA parameter file). Any mandatory parameters for which there is no default and that are not specified explicitly in the command string must be specified by means of an IDA parameter file.
- SOURCE | SRC
- The fully-qualified name of a compressed file that contains all the source files that are needed by the UDX that is to be deployed.
- PROJECT | PROJ
- The name of the project directory that is to be created for the specified set of source files.
The name can contain only alphanumeric characters (A-Z, a-z, 0-9) and underscore characters (_). The
default is the name, without the extension, of the file specified for the
SOURCE
parameter. - REPLACE
- If a project with the specified name already exists, whether to:
- YES
- Delete the existing project and replace it with the new one.
- NO
- Cancel the command and take no action.
- PROMPT
- Prompt the user to specify whether to:
- Continue with the command and delete and replace the existing project.
- Cancel the command and take no action.
- PROMOTE
- A comma-separated list of files that, in addition to the generated library (and for UDXs written
in C++, in addition to the files specified for the
library
parameter) are to be promoted to the release directory. - LANGUAGE | LANG
- The language in which the UDX is written:
- CPP
- For C++.
- LUA
- For Lua.
- PYTHON
- For Python.
- R
- For R.
Depending on the language of the UDX, parameters belonging to one of the following groups can or must be specified:- C++ parameters
- Lua parameters
- Python parameters
- R parameters
- UDXLIBRARY | UDXLIB
- This parameter depends on the language in which the UDX is written:
- C++
- If the library file that is to be registered is different from the library file that was created
by the link step, use this parameter to specify the full name, including the path from the project
directory and the extension, of that file. The extension must be .so. The default is a file
in the release directory with the name that was specified for the LIBRARY parameter or, if none was
specified, the default value of that parameter, followed by .so, for example
release/libudx77.so
. - Lua
- If the compressed file that contains the source files contains more than one file with the extension .nzl, use this parameter to specify which file to be used for the UDX. The extension must be .nzl.
- Python
- If the compressed file that contains the source files contains more than one file with the extension .py, use this parameter to specify which file to be used for the UDX. The extension must be .py.
- R
- If the compressed file that contains the source files contains more than one file with the extension .R, use this parameter to specify which file to be used for the UDX. The extension must be .R.
- CLASS
- The class (that is, the label of the entry point in the shared library) of the UDX.
- SIGNATURE | SIG
- The signature of the UDX. For example:
UDX Type Signature Description UDSF udx42(VARCHAR,CHAR)
A UDSF with the name udx42
that accepts two input arguments (one VARCHAR and one CHAR).UDTF "sig=UDTFONEINT(integer)"
A UDTF with the name UDTFONEINT
that accepts one input argument (an integer).UDAF "sandd(int,int) aggregate with (int,int)"
A UDAF with the name sandd
that accepts two input arguments (both integers). - RETURN
- The data type of the data that is returned by the UDX:
- For a UDSF or UDAF, this is a simple data type such as
int
orchar
. - For a UDTF, this is a string of the form
"TABLE(<name> <data_type>)"
. For example,"TABLE(t1 integer)"
indicates that the returned data is in a table with the namet1
that contains one column of integer data.
- For a UDSF or UDAF, this is a simple data type such as
- ENVIRONMENT | ENV
- A string containing a comma-separated list of the environment variables that are to be used
during UDX registration. For
example:
ENV "'USD_TO_INR'='60','EUR_TO_INR'='80'"
- DETERMINISTIC | DET
- Whether the UDX is to be deterministic.
- CALLEDONNULLINPUT | NULLCALL
- Whether the UDX is to be called when one or more of the input values is NULL.
- ALLOWPARALLEL | PARALLEL
- Whether the UDX is to allow parallel processing. The value YES can be specified only for a UDSF or UDAF, not a UDTF.
- LIBRARY | LIB
- The name that is to be assigned to the generated library file, including the extension. The
default is a name of the form
lib<project>.so
. For example, if the project name isudx77
, the default name of the generated library will belibudx77.so
.If additional object files (.o files), static libraries (.a files), or shared libraries (.so files) are to be included in the link step and promoted to the release directory, these can be specified in a comma-separated list following the specified library name. The DEPLOYUDX operation will search for the files in the directories specified by the LIBRARYDIRECTORIES parameter, so the names are not to contain path information. The file names must include the file extension. For example:
mylib.so(obj1.o,obj2.o,lib25.so,lib50.a)
. - USELIBRARY | USELIB
- A comma-separated list of
<project>[:<library>]
entries which are UDSLs that the build library depends on. Passed to IDA REST API call. Available only for C++. Thelibrary
part defaults tolib<project>.so
. Any library referenced in the list results in a symbolic link to it in therelease/DEPS
folder. - INCLUDEDIRECTORIES | INCLUDEDIRS
- A comma-separated list of subdirectories relative to the project directory that contain files to
be included during compilation. For
example:
INCLUDEDIRS "inc/sub2,myincludes"
- BINARYDIRECTORY | BINDIR
- The name of the subdirectory of the project directory in which the object files created during compilation are to be stored.
IDA parameter file
A IDA parameter file contains settings for one or more command parameters. You can use a parameter file to set values for mandatory parameters (so that they do not have to be specified in the command string) and to set or change default values for optional parameters.
Parameter syntax is the same regardless of whether a parameter is specified in a command string or parameter file. A parameter that is specified explicitly in a command string overrides the corresponding parameter setting in a parameter file. If a parameter file specifies a parameter that does not apply (for example, if it specifies the CLASS parameter for a UDX written in a language other than C++), the parameter is ignored.
LANG CPP
SRC udxin7.tar
PROJ proj7
SIG udx7(int,char,char)
RETURN int
PROMOTE "ab.xml,x77.txt"
ENV "'USD_TO_INR'='60','EUR_TO_INR'='80'"
DET YES
NULLCALL YES
PARALLEL YES
REPLACE PROMPT
CLASS UDcf
LIB mylib.so(obj1.o,obj2.o,lib25.so,lib50.a)
LIBDIRS "libs/a22,temp"
UDXLIB udxseven
INCLUDEDIRS "inc/sub2,myincludes"
DEBUG YES
INCLUDEDIRS "inc/sub2,myincludes"
PARALLEL YES
Examples
pf1.txt
:SQL> IDA DEPLOYUDX PARAMFILE pf1.txt
pf1.txt
.SQL> IDA DEPLOYUDX PARAMFILE pf1.txt SRC udxin4.tar UDXLIB x11
SQL> IDA DEPLOYUDX SRC C:\udxdev\udx1.tar SIG udx1(int,int) CLASS ABin RETURN char