16.20 - Specifying Source File Locations - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

The CREATE FUNCTION statement provides clauses that specify the name and path of the function source code.

CREATE FUNCTION Clause Description
EXTERNAL Use the EXTERNAL clause when the function source is in the current or default directory on the client, and no other files need to be included.

If the CREATE FUNCTION includes the SPECIFIC clause, then the source name is the same as the specific name; otherwise, the source name is the name that immediately follows the CREATE FUNCTION keywords.

If the client is...

  • workstation-attached, then BTEQ adds appropriate file extensions to the source name to locate the source file.
  • mainframe-attached, then the source name must be a DDNAME file name.
EXTERNAL NAME function_name Use the EXTERNAL function_name clause when the function source is in the current or default directory on the client, and no other files need to be included.

The source name is the same as function_name.

If the client is...

  • workstation-attached, then BTEQ adds appropriate file extensions to function_name to locate the source file.
  • mainframe-attached, then function_name must be a DDNAME file name.
EXTERNAL NAME 'string'
Use ' string ' to specify names and locations of the following:
  • Function source, include header files, object files, libraries, and packages on the server.
  • Function source, include header files, and object files on the client.

You can also use 'string' to specify that the source or include files not be stored.

If the client is...

  • workstation-attached, then if necessary, BTEQ adds appropriate file extensions to the names to locate the files.
  • mainframe-attached, then the names must be DDNAME file names.