parquet-go: github.com/xitongsys/parquet-go/writer Index | Files

package writer

import "github.com/xitongsys/parquet-go/writer"

Index

Package Files

csv.go json.go writer.go

type CSVWriter Uses

type CSVWriter struct {
    ParquetWriter
}

func NewCSVWriter Uses

func NewCSVWriter(md []string, pfile source.ParquetFile, np int64) (*CSVWriter, error)

Create CSV writer

func (*CSVWriter) WriteString Uses

func (self *CSVWriter) WriteString(recsi interface{}) error

Write string values to parquet file

type JSONWriter Uses

type JSONWriter struct {
    ParquetWriter
}

func NewJSONWriter Uses

func NewJSONWriter(jsonSchema string, pfile source.ParquetFile, np int64) (*JSONWriter, error)

Create JSON writer

type ParquetWriter Uses

type ParquetWriter struct {
    SchemaHandler *schema.SchemaHandler
    NP            int64 //parallel number
    Footer        *parquet.FileMetaData
    PFile         source.ParquetFile

    PageSize        int64
    RowGroupSize    int64
    CompressionType parquet.CompressionCodec
    Offset          int64

    Objs              []interface{}
    ObjsSize          int64
    ObjSize           int64
    CheckSizeCritical int64

    PagesMapBuf map[string][]*layout.Page
    Size        int64
    NumRows     int64

    DictRecs map[string]*layout.DictRecType

    MarshalFunc func(src []interface{}, bgn int, end int, sh *schema.SchemaHandler) (*map[string]*layout.Table, error)
}

ParquetWriter is a writer parquet file

func NewParquetWriter Uses

func NewParquetWriter(pFile source.ParquetFile, obj interface{}, np int64) (*ParquetWriter, error)

Create a parquet handler. Obj is a object with tags or JSON schema string.

func (*ParquetWriter) Flush Uses

func (self *ParquetWriter) Flush(flag bool) error

Flush the write buffer to parquet file

func (*ParquetWriter) RenameSchema Uses

func (self *ParquetWriter) RenameSchema()

Rename schema name to exname in tags

func (*ParquetWriter) SetSchemaHandlerFromJSON Uses

func (self *ParquetWriter) SetSchemaHandlerFromJSON(jsonSchema string) error

func (*ParquetWriter) Write Uses

func (self *ParquetWriter) Write(src interface{}) error

Write one object to parquet file

func (*ParquetWriter) WriteStop Uses

func (self *ParquetWriter) WriteStop() error

Write the footer and stop writing

Package writer imports 13 packages (graph) and is imported by 5 packages. Updated 2019-11-12. Refresh now. Tools for package owners.