Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetParquetRow ¶ added in v1.0.0
func GetParquetRow(pkg *common.DataRecord) parquetrow.ParquetRow
GetParquetRow returns the exportable parquet representation of a record, including common attributes
func ParquetName ¶ added in v1.0.0
func ParquetName(pkg *common.DataRecord, stream OutStream) string
ParquetName returns the whole name of the parquet, including partitioning prefix
Types ¶
type CSV ¶
type CSV struct { Name string HasSpec bool HasHead bool NHeaders int // contains filtered or unexported fields }
CSV gives easy access for csv writing
func (*CSV) SetHeaderRow ¶
SetHeaderRow writes header, only allows once and if specifications previously written
func (*CSV) SetSpecifications ¶
SetSpecifications writes specifications, only allows once
type CSVCollection ¶
type CSVCollection struct {
// contains filtered or unexported fields
}
CSVCollection hold all active csv writers
func NewCollection ¶
func NewCollection(factory CSVFactory) CSVCollection
NewCollection returns a novel ready to use CSVCollection
func (*CSVCollection) CloseAll ¶
func (collection *CSVCollection) CloseAll()
CloseAll closes all open streams
func (*CSVCollection) Write ¶
func (collection *CSVCollection) Write(pkg *common.DataRecord) error
Write adds a csv row into the relevant out stream
type CSVFactory ¶
type CSVFactory func(pkg *common.DataRecord, stream OutStream) (CSVWriter, error)
CSVFactory is a function that creates CSVWriters
type CSVWriter ¶
type CSVWriter interface { Close() SetSpecifications(specs []string) error SetHeaderRow(columns []string) error WriteData(data []string) error }
CSVWriter implements ease of use writing functions
type OutStream ¶
type OutStream int
OutStream is the type for the outstream enum
const ( // Unknown is an unregonized out stream Unknown OutStream = iota // HTR is a HTR timeseries out stream HTR // PWR is a PWR timeseries out stream PWR // CPRU is a CPRU timeseries out stream CPRU // STAT is as STAT timeseries out stream STAT // PM is a PM timeseries out stream PM // CCD is a CCD timeseries out stream CCD // TCV is a TCV timeseries out stream TCV )
func OutStreamFromDataRecord ¶
func OutStreamFromDataRecord(pkg *common.DataRecord) OutStream
OutStreamFromDataRecord infers stream based on data
type Parquet ¶ added in v1.0.0
Parquet gives easy access for parquet writing
type ParquetCollection ¶ added in v1.0.0
type ParquetCollection struct {
// contains filtered or unexported fields
}
ParquetCollection holds all active ParquetWriters
func NewParquetCollection ¶ added in v1.0.0
func NewParquetCollection(factory ParquetFactory) ParquetCollection
NewParquetCollection returns a novel ready to use ParquetCollection
func (*ParquetCollection) CloseAll ¶ added in v1.0.0
func (collection *ParquetCollection) CloseAll()
CloseAll closes all open streams
func (ParquetCollection) Write ¶ added in v1.0.0
func (collection ParquetCollection) Write(pkg *common.DataRecord) error
Write adds a parquet row into the relevant out stream
type ParquetFactory ¶ added in v1.0.0
type ParquetFactory func(pkg *common.DataRecord, stream OutStream) (ParquetWriter, error)
ParquetFactory is a function that creates ParquetWriters
type ParquetWriter ¶ added in v1.0.0
type ParquetWriter interface { Close() WriteData(data interface{}) error }
ParquetWriter implements ease of use writing functions
func NewParquet ¶ added in v1.0.0
func NewParquet(name string, pkg *common.DataRecord) ParquetWriter
NewParquet returns a Timeseries as parquet