Package org.apache.flink.cdc.python
Class PythonUdf
- java.lang.Object
-
- org.apache.flink.cdc.python.PythonUdf
-
- All Implemented Interfaces:
UserDefinedFunction
@Experimental public final class PythonUdf extends Object implements UserDefinedFunction
Generic UDF that delegates to a Python function defined inline in YAML.
-
-
Field Summary
Fields Modifier and Type Field Description static ConfigOption<String>OPTION_PYTHON_EXECUTABLEstatic ConfigOption<String>OPTION_PYTHON_FILESstatic ConfigOption<String>OPTION_SOURCE
-
Constructor Summary
Constructors Constructor Description PythonUdf()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This will be invoked before a UDF got destroyed.Objecteval(Object... args)DataTypegetReturnType(UserDefinedFunctionContext context)Returns the return type of this UDF, given the per-UDF YAML options.voidopen(UserDefinedFunctionContext context)This will be invoked every time when a UDF got created.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.cdc.common.udf.UserDefinedFunction
getReturnType, open
-
-
-
-
Field Detail
-
OPTION_SOURCE
public static final ConfigOption<String> OPTION_SOURCE
-
OPTION_PYTHON_EXECUTABLE
public static final ConfigOption<String> OPTION_PYTHON_EXECUTABLE
-
OPTION_PYTHON_FILES
public static final ConfigOption<String> OPTION_PYTHON_FILES
-
-
Method Detail
-
open
public void open(UserDefinedFunctionContext context)
Description copied from interface:UserDefinedFunctionThis will be invoked every time when a UDF got created.- Specified by:
openin interfaceUserDefinedFunction
-
close
public void close()
Description copied from interface:UserDefinedFunctionThis will be invoked before a UDF got destroyed.- Specified by:
closein interfaceUserDefinedFunction
-
getReturnType
public DataType getReturnType(UserDefinedFunctionContext context)
Description copied from interface:UserDefinedFunctionReturns the return type of this UDF, given the per-UDF YAML options.- Specified by:
getReturnTypein interfaceUserDefinedFunction
-
-