Installing a Library of General Global Functions - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Another way to provide general global functions that UDFs can reference is to install a separate library of functions on the database on all nodes.

Here is an example that uses the package name clause of the CREATE FUNCTION statement to install a library of functions:

CREATE FUNCTION UDF1(A CHAR(30))
RETURNS INTEGER
  ...
EXTERNAL NAME 'SP!/usr/local/lib/libGenUdfs.so!F!udf1'

where libGenUdfs.so is a shared object file containing the library of functions that UDF1 can call and udf1 is the function entry point name in the shared object file for UDF1.

The shared object file must already be installed on the system and distributed to all its nodes before you use the CREATE FUNCTION statement. If you migrate to another system, you must copy the shared object file to /usr/local/lib on the target system before starting the Teradata Database migration.

For more information on installing libraries, see Administration.