Documentation
¶
Index ¶
- func ParquetGroupNodeForDbnSchema(dbnSchema dbn.Schema) *pqschema.GroupNode
- func ParquetGroupNode_ImbalanceMsg() *pqschema.GroupNode
- func ParquetGroupNode_Mbp0Msg() *pqschema.GroupNode
- func ParquetGroupNode_Mbp1Msg() *pqschema.GroupNode
- func ParquetGroupNode_OhlcvMsg() *pqschema.GroupNode
- func ParquetWriteRow_ImbalanceMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.ImbalanceMsg, ...) error
- func ParquetWriteRow_Mbp0Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp0Msg, ...) error
- func ParquetWriteRow_Mbp1Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp1Msg, ...) error
- func ParquetWriteRow_OhlcvMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.OhlcvMsg, ...) error
- func SplitFile(sourceFilename string, destDir string, forceZstdInput bool, verbose bool) error
- func WriteAsJson[T any](val *T, writer io.Writer) error
- func WriteDbnFileAsJson(sourceFile string, forceZstdInput bool, writer io.Writer) error
- func WriteDbnFileAsParquet(sourceFile string, forceZstdInput bool, destFile string) error
- type JsonWriterVisitor
- func (v *JsonWriterVisitor) OnCmbp1(record *dbn.Cmbp1Msg) error
- func (v *JsonWriterVisitor) OnErrorMsg(record *dbn.ErrorMsg) error
- func (v *JsonWriterVisitor) OnImbalance(record *dbn.ImbalanceMsg) error
- func (v *JsonWriterVisitor) OnInstrumentDefMsg(record *dbn.InstrumentDefMsg) error
- func (v *JsonWriterVisitor) OnMbo(record *dbn.MboMsg) error
- func (v *JsonWriterVisitor) OnMbp0(record *dbn.Mbp0Msg) error
- func (v *JsonWriterVisitor) OnMbp1(record *dbn.Mbp1Msg) error
- func (v *JsonWriterVisitor) OnMbp10(record *dbn.Mbp10Msg) error
- func (v *JsonWriterVisitor) OnOhlcv(record *dbn.OhlcvMsg) error
- func (v *JsonWriterVisitor) OnStatMsg(record *dbn.StatMsg) error
- func (v *JsonWriterVisitor) OnStatusMsg(record *dbn.StatusMsg) error
- func (v *JsonWriterVisitor) OnStreamEnd() error
- func (v *JsonWriterVisitor) OnSymbolMappingMsg(record *dbn.SymbolMappingMsg) error
- func (v *JsonWriterVisitor) OnSystemMsg(record *dbn.SystemMsg) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParquetGroupNodeForDbnSchema ¶
ParquetSchemaForDbnSchema returns a GroupNode
func ParquetGroupNode_ImbalanceMsg ¶
ParquetGroupNode_ImbalanceMsg returns the Parquet Schema's Group Node for OhlcvMsg.
optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false)); optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional double field_id=-1 ref_price; optional int64 field_id=-1 auction_time (Int(bitWidth=64, isSigned=false)); optional double field_id=-1 cont_book_clr_price; optional double field_id=-1 auct_interest_clr_price; optional double field_id=-1 ssr_filling_price; optional double field_id=-1 ind_match_price; optional double field_id=-1 upper_collar; optional double field_id=-1 lower_collar; optional int32 field_id=-1 paired_qty (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 total_imbalance_qty (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 market_imbalance_qty (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 unpaired_qty (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 auction_type (String); optional binary field_id=-1 side (String); optional int32 field_id=-1 auction_status (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 freeze_status (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 num_extensions (Int(bitWidth=8, isSigned=false)); optional binary field_id=-1 unpaired_side (String); optional binary field_id=-1 significant_imbalance (String); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
func ParquetGroupNode_Mbp0Msg ¶
ParquetGroupNode_Mbp0Msg returns the Parquet Schema's Group Node for OhlcvMsg.
optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false)); optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 action (String); optional binary field_id=-1 side (String); optional int32 field_id=-1 depth (Int(bitWidth=8, isSigned=false)); optional double field_id=-1 price; optional int32 field_id=-1 size (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 flags (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 ts_in_delta; optional int32 field_id=-1 sequence (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
func ParquetGroupNode_Mbp1Msg ¶
ParquetGroupNode_Mbp1Msg returns the Parquet Schema's Group Node for OhlcvMsg.
optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false)); optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 action (String); optional binary field_id=-1 side (String); optional int32 field_id=-1 depth (Int(bitWidth=8, isSigned=false)); optional double field_id=-1 price; optional int32 field_id=-1 size (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 flags (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 ts_in_delta; optional int32 field_id=-1 sequence (Int(bitWidth=32, isSigned=false)); optional double field_id=-1 bid_px_00; optional double field_id=-1 ask_px_00; optional int32 field_id=-1 bid_sz_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 ask_sz_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 bid_ct_00 (Int(bitWidth=32, isSigned=false)); optional int32 field_id=-1 ask_ct_00 (Int(bitWidth=32, isSigned=false)); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_recv (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
func ParquetGroupNode_OhlcvMsg ¶
ParquetGroupNode_OhlcvMsg returns the Parquet Schema's Group Node for OhlcvMsg.
optional int32 field_id=-1 rtype (Int(bitWidth=8, isSigned=false)); optional int32 field_id=-1 publisher_id (Int(bitWidth=16, isSigned=false)); optional int32 field_id=-1 instrument_id (Int(bitWidth=32, isSigned=false)); optional double field_id=-1 open; optional double field_id=-1 high; optional double field_id=-1 low; optional double field_id=-1 close; optional int64 field_id=-1 volume (Int(bitWidth=64, isSigned=false)); optional binary field_id=-1 symbol (String); optional int64 field_id=-1 ts_event (Timestamp(isAdjustedToUTC=true, timeUnit=nanoseconds, is_from_converted_type=false, force_set_converted_type=false));
func ParquetWriteRow_ImbalanceMsg ¶
func ParquetWriteRow_ImbalanceMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.ImbalanceMsg, dbnSymbolMap *dbn.TsSymbolMap) error
func ParquetWriteRow_Mbp0Msg ¶
func ParquetWriteRow_Mbp0Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp0Msg, dbnSymbolMap *dbn.TsSymbolMap) error
func ParquetWriteRow_Mbp1Msg ¶
func ParquetWriteRow_Mbp1Msg(rgw pqfile.BufferedRowGroupWriter, record *dbn.Mbp1Msg, dbnSymbolMap *dbn.TsSymbolMap) error
func ParquetWriteRow_OhlcvMsg ¶
func ParquetWriteRow_OhlcvMsg(rgw pqfile.BufferedRowGroupWriter, record *dbn.OhlcvMsg, dbnSymbolMap *dbn.TsSymbolMap) error
func SplitFile ¶
SplitFile splits a source file into "<feed>/<instrument_id>/Y/M/D/feed-YMD.type.dbn.zst"`
func WriteAsJson ¶
WriteAsJson writes a value marshalled as JSON to the writer, returning any error.
func WriteDbnFileAsJson ¶
Types ¶
type JsonWriterVisitor ¶
type JsonWriterVisitor struct {
// contains filtered or unexported fields
}
JsonWriterVisitor is an implementation of all the dbn.Visitor interface. It marshals all the records as JSON anout outputs it to its Writer
func NewJsonWriterVisitor ¶
func NewJsonWriterVisitor(writer io.Writer) *JsonWriterVisitor
NewJsonWriterVisitor creates a new JsonWriterVisitor with the given writer.
func (*JsonWriterVisitor) OnErrorMsg ¶
func (v *JsonWriterVisitor) OnErrorMsg(record *dbn.ErrorMsg) error
func (*JsonWriterVisitor) OnImbalance ¶
func (v *JsonWriterVisitor) OnImbalance(record *dbn.ImbalanceMsg) error
func (*JsonWriterVisitor) OnInstrumentDefMsg ¶
func (v *JsonWriterVisitor) OnInstrumentDefMsg(record *dbn.InstrumentDefMsg) error
func (*JsonWriterVisitor) OnStatMsg ¶
func (v *JsonWriterVisitor) OnStatMsg(record *dbn.StatMsg) error
func (*JsonWriterVisitor) OnStatusMsg ¶
func (v *JsonWriterVisitor) OnStatusMsg(record *dbn.StatusMsg) error
func (*JsonWriterVisitor) OnStreamEnd ¶
func (v *JsonWriterVisitor) OnStreamEnd() error
func (*JsonWriterVisitor) OnSymbolMappingMsg ¶
func (v *JsonWriterVisitor) OnSymbolMappingMsg(record *dbn.SymbolMappingMsg) error
func (*JsonWriterVisitor) OnSystemMsg ¶
func (v *JsonWriterVisitor) OnSystemMsg(record *dbn.SystemMsg) error