Installing a Library of General Global Functions - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
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 database migration.

For more information on installing libraries, see Administration.