Package Name Clause - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

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
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

The Package Name clause specifies an explicit path to a package file that is to be used for this external procedure definition. Packages are libraries that can contain external procedure C or C++ functions and other functions to be called by an external procedure.

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 procedures 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 procedure entry point name string (see EXTERNAL NAME Clause).

To distribute a third-party package to a database node, use their documented installation procedure. If you are installing a package developed by your programming staff, you can use either of the following general procedures.
  • Install the package in a specific directory and then use PCL to distribute it to all nodes.
  • FTP the package from a client system.

The syntax for this clause is as follows.

SP¡package_name

The character ¡ represents a user-defined delimiter.

If the package supports SQL calls, then you must specify the name of the API that is to handle those calls in addition to specifying an appropriate SQL Data Access option.

See Specifying the CLI Option for the EXTERNAL NAME Package Clause and SQL DATA ACCESS Clause for details.

Perform the following procedure for specifying a package file name string.

  1. Begin the clause with the character S to indicate this is a server specification.
  2. Type the character P to indicate this is a package file specification.
  3. Specify an arbitrary delimiter character to separate the P code and the package name specified in the string.
  4. Specify the path and name assigned to the package file on the server.

    The package file extension must be .so for Linux systems.

    The path must name a package or API that is already installed on the system and that has been distributed to all its nodes. Its maximum length is 256 characters.

    All names on server must be unique among the UDFs, table UDFs, and external procedures created within the same database. If the CREATE/REPLACE PROCEDURE definition includes a nonunique name_on_server specification, the system does not create it.

    You can use either \ or / characters to specify the path for all platforms.