Package com.datasqrl.json
Class JsonExtract
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.ScalarFunction
-
- com.datasqrl.json.JsonExtract
-
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
public class JsonExtract extends org.apache.flink.table.functions.ScalarFunctionExtracts 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 Stringeval(com.datasqrl.json.FlinkJsonType input, String pathSpec)Booleaneval(com.datasqrl.json.FlinkJsonType input, String pathSpec, Boolean defaultValue)Doubleeval(com.datasqrl.json.FlinkJsonType input, String pathSpec, Double defaultValue)Integereval(com.datasqrl.json.FlinkJsonType input, String pathSpec, Integer defaultValue)Stringeval(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
-
-
-
-
Method Detail
-
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)
-
-