Class 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 a FlinkSink.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 a FlinkSink.Builder to export the data from input data stream with Rows into iceberg table.
      static FlinkSink.Builder forRowData​(org.apache.flink.streaming.api.datastream.DataStream<org.apache.flink.table.data.RowData> input)
      Initialize a FlinkSink.Builder to export the data from input data stream with RowDatas into iceberg table.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 a FlinkSink.Builder to export the data from generic input data stream into iceberg table. We use RowData inside the sink connector, so users need to provide a mapper function and a TypeInformation 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 to RowData
        outputType - to define the TypeInformation 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 a FlinkSink.Builder to export the data from input data stream with Rows into iceberg table. We use RowData inside the sink connector, so users need to provide a TableSchema for builder to convert those Rows to a RowData DataStream.
        Parameters:
        input - the source input data stream with Rows.
        tableSchema - defines the TypeInformation 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 a FlinkSink.Builder to export the data from input data stream with RowDatas into iceberg table.
        Parameters:
        input - the source input data stream with RowDatas.
        Returns:
        FlinkSink.Builder to connect the iceberg table.