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