0 - 9 of 9 tags for java external stored procedures

At this point you should already be familiar with Eclipse. But if you are not, Eclipse is the de facto integrated development environment (IDE) for developing Java applications. It provides comprehensive support for Java technologies, as well as a platform for plug-in tools to extend its capabilities.

Teradata’s latest and greatest Eclipse offering has been released, and is available in the Teradata Developer Exchange download section (Eclipse_13.01.00).  Further, the 13.01.00 release builds on the 13.00.00 offering by boasting increased functionality.

A Teradata Database Java User Defined Function (JUDF) is a program that operates on data stored in relational tables. UDFs allow users to add their own extensions to the Teradata SQL language. JUDFs are implemented as external functions. This means the source is compiled externally to the DBS and kept in Java Archive (JAR) files. These JAR files are installed into the database using stored procedures in the SQLJ database. Once a JAR file is installed a JUDF can be defined to use a Java class and method within the JAR file. The JUDF is executed via a protected mode server separate from the database process. Parameters passed from the DBS are converted to their Java form and the Java return type from the JUDF  is converted back to its DBS form.
 

In the last article, it was shown how a user can create a Java External Stored Procedure (JXSP) that reads SQL using answers sets with the Teradata Plug-in for Eclipse. This article will show how a JXSP can be automatically created that reads SQL. The only thing that is required is a SQL query from the user and the content of the JXSP is automatically generated.

The Java Bean Wrapper wizard allows the user to quickly generate a Java Bean class for a given SQL statement or stored procedure. The Java Bean Wrapper Wizard has an option to create a JXSP that calls the wrapped SQL from the Java Bean.

In the last article, it was shown how a user can create an ant script to automate a build so the user can deploy a JAR and install a DDL for a Java External Stored Procedure (JXSP) outside of Eclipse. This article will show how a user can create a JXSP that reads SQL using answers sets.

Answer sets are extended result sets returned by stored procedures. This is a new feature for JXSPs in the 13.0 version of the Teradata database.

In the last article, it was shown how Teradata Plug-in facilitates the process of creating and installing the Java parts and DDL for a Java External Stored Procedure (JXSP) using the JXSP Wizard and Multi-page Editor.

A Java External Stored Procedure (JXSP) is a program written in Java that is kept and executed with in a database server. Java stored procedures are implemented as external stored procedures. This means the source is compiled externally to the DBS and kept in Java Archive (JAR) files. These JAR files are installed into the database using stored procedures in the SQLJ database. Once a JAR file is installed the JXSP can be defined to use the Java class and methods within the JAR file. The JXSP are executed via a protected mode server separate from the database process.

If you are using a 32bit Operating System then the installation process for Teradata 12.0 Express will not install the SQLJ capability as Java and SQLJ are only supported on 64bit. However, it is possible to override the default behaviour (but remember NOT Supported).

At this point you should already be familiar with Eclipse. But if you are not, Eclipse is the de facto integrated development environment (IDE) for developing Java applications. It provides comprehensive support for Java technologies, as well as a platform for plug-in tools to extend its capabilities.