Appendix : Legacy Presto components : MashZone NextGen Analytics : RAQL Queries : Create and Add User-Defined Functions for RAQL Queries : Set Up Your Development Environment
Set Up Your Development Environment
To get started, you need:
*The latest Java Development Kit 8. See JDK1.8 to download and install this, if needed.
*A folder for your user-defined function library with this structure:

MyOrgRaqlLib
lib
src
com
MyOrg
raglUdf
lib.json
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 MashZone NextGen. Library names must match the name of the library folder containing your source code.
Valid library names must be unique for a MashZone NextGen Server. They must start with a letter and can contain letters, numbers or underscores (_).
Important:  
The name analytics is reserved for the MashZone NextGen UDF function library.
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.
Note:  
You cannot use periods (.) in either library or user-defined function names as this character is the reserved separator between library and function names. See also Valid Names for Datasets, Columns, Aliases, Paths and Functions for other function name restrictions.
*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-core-version.jar for the UDF interfaces.
*And any third party JAR files you add to library-name/lib.
For an example, see Configure, Compile, Deploy and Test User-Defined Functions.
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.
Copyright © 2013-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback