public class DataSetConversionUtil extends Object
Constructor and Description |
---|
DataSetConversionUtil() |
Modifier and Type | Method and Description |
---|---|
static DataSet<Row> |
fromTable(Long sessionId,
Table table)
|
static Table |
toTable(Long sessionId,
DataSet<Row> data,
String[] colNames)
Convert the given DataSet into a Table with specified colNames.
|
static Table |
toTable(Long sessionId,
DataSet<Row> data,
String[] colNames,
TypeInformation<?>[] colTypes)
Convert the given DataSet into a Table with specified colNames and colTypes.
|
static Table |
toTable(Long sessionId,
DataSet<Row> data,
TableSchema schema)
Convert the given DataSet into a Table with specified TableSchema.
|
static Table |
toTable(MLEnvironment session,
DataSet<Row> data,
String[] colNames)
Convert the given DataSet into a Table with specified colNames.
|
static Table |
toTable(MLEnvironment session,
DataSet<Row> data,
String[] colNames,
TypeInformation<?>[] colTypes)
Convert the given DataSet into a Table with specified colNames and colTypes.
|
public static DataSet<Row> fromTable(Long sessionId, Table table)
sessionId
- the sessionId of MLEnvironmentFactory
table
- the Table to convert.public static Table toTable(Long sessionId, DataSet<Row> data, TableSchema schema)
sessionId
- the sessionId of MLEnvironmentFactory
data
- the DataSet to convert.schema
- the specified TableSchema.public static Table toTable(Long sessionId, DataSet<Row> data, String[] colNames, TypeInformation<?>[] colTypes)
sessionId
- sessionId the sessionId of MLEnvironmentFactory
.data
- the DataSet to convert.colNames
- the specified colNames.colTypes
- the specified colTypes. This variable is used only when the DataSet is
produced by a function and Flink cannot determine automatically what the produced type
is.public static Table toTable(Long sessionId, DataSet<Row> data, String[] colNames)
sessionId
- sessionId the sessionId of MLEnvironmentFactory
.data
- the DataSet to convert.colNames
- the specified colNames.public static Table toTable(MLEnvironment session, DataSet<Row> data, String[] colNames, TypeInformation<?>[] colTypes)
session
- the MLEnvironment using to convert DataSet to Table.data
- the DataSet to convert.colNames
- the specified colNames.colTypes
- the specified colTypes. This variable is used only when the DataSet is
produced by a function and Flink cannot determine automatically what the produced type
is.public static Table toTable(MLEnvironment session, DataSet<Row> data, String[] colNames)
session
- the MLEnvironment using to convert DataSet to Table.data
- the DataSet to convert.colNames
- the specified colNames.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.