Class IcebergUtils

java.lang.Object
org.apache.beam.sdk.io.iceberg.IcebergUtils

public class IcebergUtils extends Object
Utilities for converting between Beam and Iceberg types, made public for user's convenience.
  • Method Details

    • icebergSchemaToBeamSchema

      public static Schema icebergSchemaToBeamSchema(org.apache.iceberg.Schema schema)
      Converts an Iceberg Schema to a Beam Schema.
    • beamSchemaToIcebergSchema

      public static org.apache.iceberg.Schema beamSchemaToIcebergSchema(Schema schema)
      Converts a Beam Schema to an Iceberg Schema.

      The following unsupported Beam types will be defaulted to Types.StringType:

    • invalid reference
      Schema.TypeName.DECIMAL
    • beamRowToIcebergRecord

      public static org.apache.iceberg.data.Record beamRowToIcebergRecord(org.apache.iceberg.Schema schema, Row row)
      Converts a Beam Row to an Iceberg Record.
    • icebergRecordToBeamRow

      public static Row icebergRecordToBeamRow(Schema schema, org.apache.iceberg.data.Record record)
      Converts an Iceberg Record to a Beam Row.