Set Up Your Development Environment
To get started, you need:
The latest Java Development Kit 7. See
JDK1.7 to download and install this, if needed.
A folder for your user-defined function
library with this structure:
User-defined functions are packaged and deployed in named libraries. The library name also uniquely defines your user-defined functions from built-in functions or user-defined functions in other libraries that have been deployed in Business Analytics. Library names must match the name of the library folder containing your source code.
Valid library names must be unique for a Business Analytics Server. They must start with a letter and can contain letters, numbers or underscores (_).
You can organize user-defined functions however you need. User-defined functions can be packaged in multiple libraries. Each library can contain one or more Java packages. Each package can contain multiple classes. For plain functions, each class can contain one or more functions. For analytic functions, each function is packaged as a class.
JAR files for any third-party Java libraries that your user-defined functions depend on, placed in the
library-name/lib folder.
Update your classpath to include the following JAR files:
web-apps-home/mashzone/WEB-INF/lib/jackbe-presto-raql-version.jar for
RAQL.
web-apps-home/mashzone/WEB-INF/lib/rtm-version.jar for the UDF interfaces.
And any third party JAR files you add to
library-name/lib.
Important: | It is not a good practice to copy either the RAQL or UDF interface JAR files to your library-name/lib folder to simplify the classpath. This can cause errors when you deploy your user-defined function library. See Configure, Compile, Deploy and Test User-Defined Functions for more information. |
Before you compile, deploy and test your user-defined functions, you will also need a library configuration file (
lib.json). We will cover these requirements later, in
Configure, Compile, Deploy and Test User-Defined Functions.