External Java Reference Strings - 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™

When you create an external procedure written in Java, the EXTERNAL NAME clause specification is slightly different than what you would specify for an external procedure written in C or C++. For Java external procedures, you must specify an external Java reference string that specifies the JAR file name, Java class name within the JAR, and the Java method name within the class to be invoked when the system executes the procedure in the following format.

'jar_name:[package_name.]java_class_name.java_method_name
[java_data_type]'

where:

Syntax element … Specifies …
jar_name the registered name of the JAR file associated with the procedure that the system creates when you call the built-in external procedure SQLJ.Install_Jar.
[package_name.] the name and path of an external method package.

This specification is required only if the java class and method you specify are contained in an external package.

java_class_name the name of the Java class contained within the JAR identified by jar_name that contains the Java method to execute for this procedure.

If the Java class and method are contained in an external package, you must fully qualify java_class_name with the appropriate package name and path.

java_method_name the name of the Java method that is performed when this procedure executes.
[java_data_type] a string of 1 or more Java data types separated by COMMA characters.

The Java data type list provides a means of specifying the signature of a particular overloaded implementation of a Java method.

You must specify a Java data type list whenever the system must choose a particular overloaded Java method. Otherwise, it is not necessary.

A Java data type can be either simple or object-mapped according to the parameter mapping rules described in Data Type Mapping Between SQL and Java.
java_data_type names are case sensitive.