parquetinfo

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ParquetInfoKey = "antha:data-info"

ParquetInfoKey is used to embed JSON DataInfo in a Parquet file footer as `key_value_metadata`.

Variables

This section is empty.

Functions

func AddAnthaInfo

func AddAnthaInfo(meta parquet.FileKeyValueMetadata, dataInfo schemas.DataInfo) error

AddAnthaInfo inserts the JSON DataInfo representation in the footer when writing a file. Use it like:

meta := parquet.FileKeyValueMetadata{}
_ = parquetinfo.AddAnthaInfo(meta, dataInfo)
parquet.TableToBytes(table, meta.Write())

func GetAnthaInfo

func GetAnthaInfo(meta parquet.FileKeyValueMetadata) (schemas.DataInfo, error)

GetAnthaInfo reads the JSON DataInfo representation from the footer. Use it together with data tables like:

     meta := parquet.FileKeyValueMetadata{}
		table, err = parquet.TableFromReader(reader, meta.Read())
		dataInfo, err := GetAnthaInfo(meta)

Types

This section is empty.

Jump to

Keyboard shortcuts

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