Package org.apache.beam.sdk.io.iceberg
Class IcebergUtils
java.lang.Object
org.apache.beam.sdk.io.iceberg.IcebergUtils
Utilities for converting between Beam and Iceberg types, made public for user's convenience.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.iceberg.data.Record
beamRowToIcebergRecord
(org.apache.iceberg.Schema schema, Row row) Converts a BeamRow
to an IcebergRecord
.static org.apache.iceberg.Schema
beamSchemaToIcebergSchema
(Schema schema) Converts a BeamSchema
to an IcebergSchema
.static Row
icebergRecordToBeamRow
(Schema schema, org.apache.iceberg.data.Record record) Converts an IcebergRecord
to a BeamRow
.static Schema
icebergSchemaToBeamSchema
(org.apache.iceberg.Schema schema) Converts an IcebergSchema
to a BeamSchema
.
-
Method Details
-
icebergSchemaToBeamSchema
Converts an IcebergSchema
to a BeamSchema
. -
beamSchemaToIcebergSchema
Converts a BeamSchema
to an IcebergSchema
.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 BeamRow
to an IcebergRecord
. -
icebergRecordToBeamRow
Converts an IcebergRecord
to a BeamRow
.
-