IcebergUtil

@Singleton
class IcebergUtil(tableIdGenerator: TableIdGenerator)

Constructors

Link copied to clipboard
constructor(tableIdGenerator: TableIdGenerator)

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun createCatalog(catalogName: String, properties: Map<String, String>): Catalog

Builds an Iceberg Catalog.

Link copied to clipboard
fun createNamespace(streamDescriptor: DestinationStream.Descriptor, catalog: Catalog)

Create the namespace if it doesn't already exist.

Link copied to clipboard
fun createTable(streamDescriptor: DestinationStream.Descriptor, catalog: Catalog, schema: Schema): Table

Builds (if necessary) an Iceberg Table. This includes creating the table's namespace if it does not already exist. If the Table already exists, it is loaded from the Catalog.

Link copied to clipboard
Link copied to clipboard
fun toIcebergSchema(stream: DestinationStream): Schema
Link copied to clipboard
fun toRecord(record: EnrichedDestinationRecordAirbyteValue, stream: DestinationStream, tableSchema: Schema): Record

Converts an Airbyte EnrichedDestinationRecordAirbyteValue into an Iceberg Record. The converted record will be wrapped to include Operation information, which is used by the writer to determine how to write the data to the underlying Iceberg files.