The Package Name clause specifies an explicit path to a package file that is to be used for this UDF definition. Packages are libraries that can contain UDFs and other functions to be called by a UDF.
A typical package includes a function library as well as a script that contains all the necessary SQL DDL and DCL statements to create the functions and make them available to users.
A package is a shared object file with a .so extension for Linux systems.
Package files must be distributed to all server nodes.
You cannot specify the package option with any other encoded path string clause, but you can specify it with a function entry point name string (see EXTERNAL NAME Clause).
- Install the package in a specific directory and then use PCL to distribute it to all nodes.
- FTP the package from a client system.
- Use the Teradata-supplied procedure named installsp, which is stored in SYSLIB.
For instructions on how to use installsp, see Teradata Vantage™ - SQL External Routine Programming, B035-1147.
The syntax for this clause is as follows.
The character ¡ represents a user-defined delimiter.
Perform the following procedure for specifying a package file name string.
- Begin the clause with the character S to indicate this is a server specification.
- Type the character P to indicate this is a package file specification.
- Specify an arbitrary delimiter character to separate the P code and the package name specified in the string.
- Specify the path and name assigned to the package file on the platform. You must specify the appropriate file extension for the platform operating system.
The package file extension must be .so for Linux systems.
The path must name a package that is already installed on the system and that has been distributed to all its nodes.
You can use either \ or / characters to specify the path for all platforms.
The maximum package path length is 256 characters.