EXTERNAL NAME Clause - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
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 Teradata 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 Teradata 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.