tableops

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TableWriter

type TableWriter struct {
	// contains filtered or unexported fields
}

TableWriter is a wrapper that provides convenient methods for writing to a specific table

func (*TableWriter) Location

func (tw *TableWriter) Location() string

Location returns the table location

func (*TableWriter) Properties

func (tw *TableWriter) Properties() iceberg.Properties

Properties returns the table properties

func (*TableWriter) Schema

func (tw *TableWriter) Schema() *iceberg.Schema

Schema returns the table schema

func (*TableWriter) Table

func (tw *TableWriter) Table() *table.Table

Table returns the underlying Iceberg table

func (*TableWriter) WriteArrow

func (tw *TableWriter) WriteArrow(ctx context.Context, arrowTable arrow.Table, opts *WriteOptions) error

WriteArrow writes an Arrow table to the Iceberg table

func (*TableWriter) WriteParquet

func (tw *TableWriter) WriteParquet(ctx context.Context, parquetPath string, opts *WriteOptions) error

WriteParquet writes a Parquet file to the Iceberg table

func (*TableWriter) WriteRecords

func (tw *TableWriter) WriteRecords(ctx context.Context, reader array.RecordReader, opts *WriteOptions) error

WriteRecords writes from a RecordReader to the Iceberg table

type WriteOptions

type WriteOptions struct {
	// SnapshotProperties are additional properties for the snapshot
	SnapshotProperties iceberg.Properties
	// BatchSize is the number of records to batch together
	BatchSize int64
	// Overwrite determines if existing data should be overwritten
	Overwrite bool
}

WriteOptions contains options for writing data

func DefaultWriteOptions

func DefaultWriteOptions() *WriteOptions

DefaultWriteOptions returns default write options

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

Writer handles writing data to Iceberg tables

func NewWriter

func NewWriter(cat catalog.CatalogInterface) *Writer

NewWriter creates a new table writer

func (*Writer) GetTableWriter

func (w *Writer) GetTableWriter(ctx context.Context, identifier table.Identifier) (*TableWriter, error)

GetTableWriter creates a writer for a specific table

func (*Writer) WriteArrowTable

func (w *Writer) WriteArrowTable(ctx context.Context, icebergTable *table.Table, arrowTable arrow.Table, opts *WriteOptions) error

WriteArrowTable writes an Arrow table to an Iceberg table

func (*Writer) WriteParquetFile

func (w *Writer) WriteParquetFile(ctx context.Context, icebergTable *table.Table, parquetPath string, opts *WriteOptions) error

WriteParquetFile writes a Parquet file to an Iceberg table

func (*Writer) WriteRecordReader

func (w *Writer) WriteRecordReader(ctx context.Context, icebergTable *table.Table, reader array.RecordReader, opts *WriteOptions) error

WriteRecordReader writes from an Arrow RecordReader to an Iceberg table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL