Class JsonExtract

  • All Implemented Interfaces:
    Serializable, org.apache.flink.table.functions.FunctionDefinition

    public class JsonExtract
    extends org.apache.flink.table.functions.ScalarFunction
    Extracts a value from the JSON object based on the provided JSON path. An optional third argument can be provided to specify a default value when the given JSON path does not yield a value for the JSON object.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonExtract()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String eval​(com.datasqrl.json.FlinkJsonType input, String pathSpec)  
      Boolean eval​(com.datasqrl.json.FlinkJsonType input, String pathSpec, Boolean defaultValue)  
      Double eval​(com.datasqrl.json.FlinkJsonType input, String pathSpec, Double defaultValue)  
      Integer eval​(com.datasqrl.json.FlinkJsonType input, String pathSpec, Integer defaultValue)  
      String eval​(com.datasqrl.json.FlinkJsonType input, String pathSpec, String defaultValue)  
      • Methods inherited from class org.apache.flink.table.functions.ScalarFunction

        getKind, getParameterTypes, getResultType, getTypeInference
      • Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction

        close, functionIdentifier, open, toString
      • Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition

        getRequirements, isDeterministic
    • Constructor Detail

      • JsonExtract

        public JsonExtract()
    • Method Detail

      • eval

        public String eval​(com.datasqrl.json.FlinkJsonType input,
                           String pathSpec)
      • eval

        public String eval​(com.datasqrl.json.FlinkJsonType input,
                           String pathSpec,
                           String defaultValue)
      • eval

        public Boolean eval​(com.datasqrl.json.FlinkJsonType input,
                            String pathSpec,
                            Boolean defaultValue)
      • eval

        public Double eval​(com.datasqrl.json.FlinkJsonType input,
                           String pathSpec,
                           Double defaultValue)
      • eval

        public Integer eval​(com.datasqrl.json.FlinkJsonType input,
                            String pathSpec,
                            Integer defaultValue)