Package org.apache.iceberg.flink.sink
Class FlinkSink
- java.lang.Object
-
- org.apache.iceberg.flink.sink.FlinkSink
-
public class FlinkSink extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlinkSink.Builder
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> FlinkSink.Builder
builderFor(org.apache.flink.streaming.api.datastream.DataStream<T> input, org.apache.flink.api.common.functions.MapFunction<T,org.apache.flink.table.data.RowData> mapper, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> outputType)
Initialize aFlinkSink.Builder
to export the data from generic input data stream into iceberg table.static FlinkSink.Builder
forRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> input, org.apache.flink.table.api.TableSchema tableSchema)
Initialize aFlinkSink.Builder
to export the data from input data stream withRow
s into iceberg table.static FlinkSink.Builder
forRowData(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input)
Initialize aFlinkSink.Builder
to export the data from input data stream withRowData
s into iceberg table.
-
-
-
Method Detail
-
builderFor
public static <T> FlinkSink.Builder builderFor(org.apache.flink.streaming.api.datastream.DataStream<T> input, org.apache.flink.api.common.functions.MapFunction<T,org.apache.flink.table.data.RowData> mapper, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> outputType)
Initialize aFlinkSink.Builder
to export the data from generic input data stream into iceberg table. We useRowData
inside the sink connector, so users need to provide a mapper function and aTypeInformation
to convert those generic records to a RowData DataStream.- Type Parameters:
T
- the data type of records.- Parameters:
input
- the generic source input data stream.mapper
- function to convert the generic data toRowData
outputType
- to define theTypeInformation
for the input data.- Returns:
FlinkSink.Builder
to connect the iceberg table.
-
forRow
public static FlinkSink.Builder forRow(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.types.Row> input, org.apache.flink.table.api.TableSchema tableSchema)
Initialize aFlinkSink.Builder
to export the data from input data stream withRow
s into iceberg table. We useRowData
inside the sink connector, so users need to provide aTableSchema
for builder to convert thoseRow
s to aRowData
DataStream.- Parameters:
input
- the source input data stream withRow
s.tableSchema
- defines theTypeInformation
for input data.- Returns:
FlinkSink.Builder
to connect the iceberg table.
-
forRowData
public static FlinkSink.Builder forRowData(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input)
Initialize aFlinkSink.Builder
to export the data from input data stream withRowData
s into iceberg table.- Parameters:
input
- the source input data stream withRowData
s.- Returns:
FlinkSink.Builder
to connect the iceberg table.
-
-