Class PythonTableUtils
- java.lang.Object
-
- org.apache.flink.table.utils.python.PythonTableUtils
-
@Internal public final class PythonTableUtils extends Object
Python utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.flink.table.api.TablecreateTableFromElement(org.apache.flink.table.api.TableEnvironment tEnv, String filePath, org.apache.flink.table.types.DataType schema, boolean batched)Create a table fromPythonDynamicTableSourcethat read data from input file with specificDataType.static org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,?>getInputFormat(List<Object[]> data, org.apache.flink.table.types.DataType dataType)Wrap the unpickled python data with an InputFormat.
-
-
-
Method Detail
-
createTableFromElement
public static org.apache.flink.table.api.Table createTableFromElement(org.apache.flink.table.api.TableEnvironment tEnv, String filePath, org.apache.flink.table.types.DataType schema, boolean batched)Create a table fromPythonDynamicTableSourcethat read data from input file with specificDataType.- Parameters:
tEnv- The TableEnvironment to create table.filePath- the file path of the input data.schema- The python data type.batched- Whether to read data in a batch- Returns:
- Table with InputFormat.
-
getInputFormat
public static org.apache.flink.api.common.io.InputFormat<org.apache.flink.table.data.RowData,?> getInputFormat(List<Object[]> data, org.apache.flink.table.types.DataType dataType)
Wrap the unpickled python data with an InputFormat. It will be passed to PythonDynamicTableSource later.- Parameters:
data- The unpickled python data.dataType- The python data type.- Returns:
- An InputFormat containing the python data.
-
-