JAR Files - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

A JAR (Java ARchive) file is a collection of Java classes in a zip file format. The classes (byte compiled Java) are referenced when an external Java routine is created using the EXTERNAL NAME clause of CREATE PROCEDURE (External Form).

JAR files are always created outside of the database. Before you can reference a class, you must register it and copy it into the SQL environment. Once a JAR has been installed in the database, you cannot change its content in any way. You are restricted to either deleting a JAR file or replacing it in its entirety.

JAR files are available only to the user who installs them by means of a call to the SQLJ.Install_Jar external procedure (see SQLJ Database and Teradata Vantage™ - SQL External Routine Programming, B035-1147 for information about this procedure). Analogous to the infrastructure for C and C++ external routines, the system creates a directory on the platform for each database that contains a JAR. Analogous to the fact that C and C++ DLLs created for 1 or more external routines in a given database cannot be accessed by other users or databases, so JAR files created for a Java external routine cannot be accessed by other users or databases.

There are no specific privileges for JAR files. Therefore, user or database A cannot create an external procedure that references a JAR installed in user or database B. However, user or database A can be granted access to a Java external procedure that has been created in user or database B by using the same privileges as are used for C and C++ external routines. See GRANT (SQL Form) in Teradata Vantage™ - SQL Data Control Language, B035-1149 for information on how to do this.

One way to ensure such ready access to Java external procedures is to install all JAR files and create all Java external procedures in the same database and then grant access to them for all users who must execute them.

See Teradata Vantage™ - SQL External Routine Programming, B035-1147 for details.