Interface BeamSqlUdf

All Superinterfaces:
Serializable

public interface BeamSqlUdf extends Serializable
Interface to create a UDF in Beam SQL.

A static method eval is required. Here is an example:

 public static class MyLeftFunction {
   public String eval(
       @Parameter(name = "s") String s,
       @Parameter(name = "n", optional = true) Integer n) {
     return s.substring(0, n == null ? 1 : n);
   }
 }

The first parameter is named "s" and is mandatory, and the second parameter is named "n" and is optional(always NULL if not specified).

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String