extractor

package
v0.0.0-...-91d8cf6 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Table      string `json:"table"`
	LastOffset int64  `json:"last_offset"`
}

Checkpoint represents the extraction progress

type Extractor

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

Extractor handles data extraction from a database table

func NewExtractor

func NewExtractor(db database.Database, table, outputFile, format string, batchSize int64, concurrency int) *Extractor

NewExtractor creates a new Extractor instance

func (*Extractor) Extract

func (e *Extractor) Extract(ctx context.Context) error

Extract extracts data from the database table

func (*Extractor) LoadCheckpoint

func (e *Extractor) LoadCheckpoint() error

LoadCheckpoint loads the last saved extraction progress

func (*Extractor) SaveCheckpoint

func (e *Extractor) SaveCheckpoint() error

SaveCheckpoint saves the current extraction progress

type ParquetWriter

type ParquetWriter interface {
	Write(values []interface{}) error
	WriteStop() error
}

ParquetWriter defines the interface for writing Parquet files

func NewParquetWriter

func NewParquetWriter(file *os.File, columns []database.Column) ParquetWriter

NewParquetWriter creates a new ParquetWriter instance

Jump to

Keyboard shortcuts

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