Java Application Classes Overview | Teradata Vantage - Overview - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

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
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

The following sections discuss Java application classes that Teradata provides in the javFnc.jar archive for use by Java UDFs and external stored procedures (collectively called external routines).

Only public methods that are currently supported appear in this section.

Java external routines can use the following application classes that Teradata provides in the javFnc.jar archive.

IF the external routine is a … AND it … THEN use …
Java UDF or external stored procedure uses an SQL BLOB type parameter and specifies a data access clause of NO SQL in the CREATE/REPLACE FUNCTION or CREATE/REPLACE PROCEDURE statement com.teradata.fnc.Blob
Java UDF or external stored procedure uses an SQL CLOB type parameter and specifies a data access clause of NO SQL in the CREATE/REPLACE FUNCTION or CREATE/REPLACE PROCEDURE statement com.teradata.fnc.Clob
Java UDF or external stored procedure needs to obtain session information related to the current execution of the UDF or external stored procedure com.teradata.fnc.DbsInfo
Java UDF or external stored procedure writes trace output into a temporary trace table defined by a CREATE GLOBAL TEMPORARY TRACE TABLE statement for debugging purposes com.teradata.fnc.TraceObj
Java UDF or external stored procedure needs to access query band information for a session, transaction, and/or profile com.teradata.fnc.QueryBand
Java UDF is an aggregate UDF com.teradata.fnc.Phase
com.teradata.fnc.Context
Java UDF is a table UDF com.teradata.fnc.Tbl
com.teradata.fnc.AmpInfo
com.teradata.fnc.NodeInfo
Java UDF is a table operator com.teradata.fnc.operator
com.teradata.fnc.operator.MetaData
com.teradata.fnc.runtime
Java Application Class Description
com.teradata.fnc.Array ARRAY/VARRAY type parameters to a Java routine are mapped to java.sql.Array. The java.sql.Array interface provides methods for bringing the data of an SQL ARRAY value to the client as either an array or a ResultSet object. The java.sql.Array interface is implemented by the com.teradata.fnc.Array class.
com.teradata.fnc.SQLXML XML type parameters to a Java routine are mapped to java.sql.SQLXML. The java.sql.SQLXML interface provides methods for bringing the data of an SQL XML value to the client as a String, a Reader or Writer, or as a Stream. The java.sql.SQLXML interface is implemented by the com.teradata.fnc.SQLXML class.
com.teradata.fnc.ST_Geometry ST_Geometry data types can be optionally mapped to the com.teradata.fnc.ST_Geometry Java class.

Geospatial data can be retrieved in either the Well-Known Text (WKT) or Well-Known Binary (WKB) format as a CLOB (for WKT) or a BLOB (for WKB) from an input ST_Geometry value, and either format can be written to a return ST_Geometry via the same respective CLOB and BLOB types.

com.teradata.fnc.Struct Structured UDT and Period data types are mapped to the java.sql.Struct interface. The java.sql.Struct interface is implemented by the com.teradata.fnc.Struct class.