EXTERNAL NAME Clause: CREATE FUNCTION and REPLACE FUNCTION (External Form) - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

You use the External Name clause to specify the locations of all components needed to create the external routine.

Customers using Vantage delivered as-a-service cannot create their own C++ and Java UDFs or External Stored Procedures.

All files included by, or linked to, an external routine must be accessible to the database. These files can reside on a client system or within Database Engine 20. Best practice is to keep the source on the client system to make sure that the programmer writing the external routine can control who can access the code. To do this, specify the C option in the external string literal clause to notify the system that the source is stored on the client.

Source code files can be stored on the database server using the S option in the external string literal clause to notify the system that the source is stored on the server. There are specific default server directories for that purpose.

The system automatically copies any client-resident source, header, or object files specified in the External Name clause to the server. The system does not transport external libraries and shared object files, which must be manually installed in Database Engine 20.

You can specify the external function name in one of three ways:
  • As an external routine name identifier with optional Parameter Style clause.
  • As an external routine object name.
  • As a coded string that specifies the explicit path to the specified code entity.
    External Routine Name Meaning
    Identifier Identifier is name of entry point for external routine object.

    Identifier is case-sensitive and must match C or C++ external routine name.

    String String is composed of one of the following:
    • C or C++ external routine entry point name specification
    • Encoded path to specified code entity

    For Java external routine, you must specify an external Java reference string.

    Maximum length of string is 1,000 characters.

You can specify more than one encoded string per external routine definition, but specific encoded strings can be specified only once within a list of strings.