IcebergUtil

@Singleton
class IcebergUtil(tableIdGenerator: TableIdGenerator)

Constructors

Link copied to clipboard
constructor(tableIdGenerator: TableIdGenerator)

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 toIcebergRecord(fields: Map<String, AirbyteValue>, icebergSchema: Schema): GenericRecord
Link copied to clipboard
fun toIcebergSchema(stream: DestinationStream): Schema