- Project Structure: The
myjavafunctionfolder contains a sample Java project, demonstrating the structure and necessary components of a Flink UDF. - Defining the Function: The main component of this project is the
MyScalarFunctionclass. This is the implementation of a custom flink function. DataSQRL recognizes flink functions that extend any base Flink UDF class. - ServiceLoader Entry: The function must be registered with a ServiceLoader entry. This is essential for DataSQRL to recognize and use your UDF.
- AutoService Library: The example includes the AutoService library by Google, simplifying the creation of ServiceLoader
META-INFmanifest entries. - JAR Compiling: Compile the sample project and build a jar. This jar is what DataSQRL will use to discover your function.
It reads the manifest entries for any UserDefinedFunction classes and load them into DataSQRL for use in queries.
It can be placed into any folder relative to the sqrl root folder which will translate to the import path.
In the example, we will use the
targetdirectory that the compilation process creates.
maven-project
Directory actions
More options
Directory actions
More options
maven-project
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||