0 - 12 of 12 tags for jxsp

Customers are currently leveraging Teradata's features such as User Defined Functions (UDFs) and External Stored Procedures (XSPs) to develop complex applications.

The aim of this set articles is to show the user how to use the Eclipse IDE to debug in a single-node, controlled, non-production environment:

  • Java or C/C++ User Defined Functions (UDFs)
  • Java or C/C++ External Stored Procedures (XSPs)

The audience for this set of articles ranges from Teradata associates within the R&D and Professional Services organizations to  Teradata Customer and Partner developers who want to debug a UDF/XSP running on their  DBS VM before installing it on a production system.

In addition to stored procedures, which use SQL control and condition-handling statements, input and output parameters, and local variables to provide applications with a server-based, precompiled procedural interface, Teradata Database supports external stored procedures.

An integrated development environment is crucial to software developers for editing, building and debugging their program all within one environment. Therefore, setting up the right development environment is an important first task.

In this blog I would like to share my knowledge on how you can use a Java External Stored Procedure (JXSP) to write to a file on a file system. 

In order to perform an IO operation (e.g. write to a text file) from the JXSP, you need to do the following :

In the first two parts of this Mini Section we have been looking at the concept of Embedding analytical processing directly within the Teradata Database. Part one used a SQL Stored Procedure to act as an Isolation layer between the Enterprise Application and the Teradata Database. Part two replicated this isolation concept using the Java External Stored Procedure (JXSP) approach. Part three combined the JXSP with the previously prepared, Spring Framework based, Business Processes. This final Part illustrates how to little code is now required in the Presentation Veneer (Web service process) due to the embedding of the Business Logic within the Teradata Database.

In the first two parts of this Mini Section we have been looking at the concept of Embedding analytical processing directly within the Teradata Database. In the first part we used a SQL Stored Procedure to act as an Isolation layer between the Enterprise Application and the Teradata Database. In the second part we progressed along the same line of providing an Isolation layer but this time we employed the Java External Stored Procedure (JXSP) approach. In this third part we combine the JXSP, as an Isolation layer in order to cross the great divide between the enterprise and the database, with the TZA-InsuranceProcess business processes developed previously.

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.

Last time we introduced the SQL Stored Procedure as a means to provide for Embedded Analytics.

However, as of Teradata 12.0 it is possible to use the Java Language as the basis for External Stored Procedures (known as JXSP’s), so this week we will develop a Java based version of the ApplyRiskFactorsToQuote Stored Procedure.

TD12+

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).