16.20 - External Java Reference Strings - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Detailed Topics

Teradata Database
Teradata Vantage NewSQL Engine
Release Number
March 2019
Content Type
Programming Reference
Publication ID
English (United States)

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.



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.