Specifying Source File Locations - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

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.