EXTERNAL NAME Clause - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Advanced SQL Engine
Teradata Database
Release Number
July 2021
English (United States)
Last Update
Product Category
Teradata Vantage™

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

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 the database; however, for security reasons, the best practice is to keep the source on the client system to ensure 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.

If security is not an issue, you can store the source code files 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. Note that the system does not transport external libraries and shared object files, which must be manually installed in the database.

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.
    IF the external routine name is ... THEN ...
    an identifier it is the name of the entry point for the external routine object.

    The identifier is case sensitive and must match the C or C++ external routine name.

    a string it is composed of one of the following:
    • a C or C++ external routine entry point name specification
    • an encoded path to the specified code entity

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

    The maximum length of the external name string is 1,000 characters.

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