Class RowDataToAvroGenericRecordConverter

java.lang.Object
org.apache.iceberg.flink.source.RowDataToAvroGenericRecordConverter
All Implemented Interfaces:
Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>

@Internal public class RowDataToAvroGenericRecordConverter extends Object implements Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>
This is not serializable because Avro Schema is not actually serializable, even though it implements Serializable interface.
  • Method Details

    • apply

      public org.apache.avro.generic.GenericRecord apply(org.apache.flink.table.data.RowData rowData)
      Specified by:
      apply in interface Function<org.apache.flink.table.data.RowData,org.apache.avro.generic.GenericRecord>
    • fromIcebergSchema

      public static RowDataToAvroGenericRecordConverter fromIcebergSchema(String tableName, Schema icebergSchema)
      Create a converter based on Iceberg schema
    • fromAvroSchema

      public static RowDataToAvroGenericRecordConverter fromAvroSchema(org.apache.avro.Schema avroSchema)
      Create a mapper based on Avro schema