Kinetica Logo

Kinetica Java UDF API

Overview

This is the 7.2 version of the server-side Java UDF API for Kinetica. UDFs are server-side programs written in this API and then installed, configured, and initiated through a separate client-side management API. These two APIs are independent of each other and do not need to be written in the same language; e.g., a UDF can be written in the Java UDF API and managed in SQL (from Workbench, KiSQL, or other database client).

The source code for this project can be found at https://github.com/kineticadb/kinetica-udf-api-java

For changes to the client-side API, please refer to CHANGELOG.md.

API

This repository contains the Kinetica Java UDF API in the proc-api directory.

In the proc-api directory, run the following command to create the API JAR:

mvn clean package

Note that due to native components this must be run on Linux with the same architecture as the Kinetica servers on which the UDFs will be used and a compatible glibc version.

In order to use the API JAR for the example, run the following command to install the jar in the local repository:

mvn install

Example

This repository also contains an example project in the proc-example directory, which implements a UDF in the Java UDF API.

This example copies one or more input tables to an output table. If the output table exists, it must have compatible columns to the input tables.

To build the JAR, run the following command in the proc-example directory:

mvn clean package

This will produce a JAR, kinetica-proc-example-7.2-jar-with-dependencies.jar, in the target directory. This JAR can be uploaded to Kinetica via the GAdmin UDF tab by clicking New and using the following parameters:

  • Name: proc-example (or as desired)

  • Command: java

  • Arguments

    • 1: -jar
    • 2: kinetica-proc-example-7.2-jar-with-dependencies.jar
  • Files: kinetica-proc-example-7.1-jar-with-dependencies.jar

Once uploaded, the UDF can be executed via GAdmin.

UDF Reference Documentation

For information about UDFs in Kinetica, please see the User-Defined Functions sections of the Kinetica documentation:

Support

For bugs, please submit an issue on Github.

For support, you can post on stackoverflow under the kinetica tag or Slack.

Contact Us