parquet

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name           string
	Type           string
	ConvertedType  string
	RepetitionType string
	Scale          *int
	Precision      *int
	Length         *int
}

func PostgresSQLParserColumnToField

func PostgresSQLParserColumnToField(column *sqlparser.ColumnDefinition) (Field, error)

type Option

type Option func(*Preserver)

func WithBatchSizeNumRecords

func WithBatchSizeNumRecords(batchSizeNumRecords int) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithRepository

func WithRepository(repository internal.Repository) Option

func WithSchema

func WithSchema(schema []Field) Option

type Preserver

type Preserver struct {
	// BatchSizeNumRecords int
	Schema Schema
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Preserver, error)

func (*Preserver) Flush

func (p *Preserver) Flush(ctx context.Context) error

func (*Preserver) NumRecordsProcessed

func (p *Preserver) NumRecordsProcessed() int

func (*Preserver) Preserve

func (p *Preserver) Preserve(ctx context.Context, record *internal.Record) error

Preserve serializes a record to a parquet file.

type Schema

type Schema []Field

func (Schema) RecordToParquetRow

func (s Schema) RecordToParquetRow(r *internal.Record) ([]any, error)

func (Schema) ToGoParquetSchema

func (s Schema) ToGoParquetSchema() []string

Jump to

Keyboard shortcuts

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