Example: Backing Up a Package - 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ā„¢

Here is an example of how to back up version 1.0 of a package called libcstd2.so and its associated CREATE statement that installs the package on the Teradata server.

lobteq << EOF

.logon slugger/adm455,sn6Y24

.using 'cstdlib2_DDL.txt'xfile 'libcstd2.so'xfile
USING (a CLOB AS DEFERRED, b CLOB AS DEFERRED)
CALL SYSLIB.savepkg('cstdlib2','1.0','SYSLIB','UP', :a,
   'libcstd2.so', :b, out1);

EOF

The CREATE statement in the cstdlib2_DDL.txt file looks something like this:

CREATE FUNCTION SYSLIB.cSTD_DEV(x FLOAT)
RETURNS FLOAT
CLASS AGGREGATE
LANGUAGE C
NO SQL
PARAMETER STYLE SQL
EXTERNAL NAME 'SP!/Teradata/dem/udfs/libcstd2.so';