bqstream

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v1.3.0

func Init()

Types

type BQClient added in v1.3.0

type BQClient interface {
	Put(ctx context.Context, datasetID, tableID string, records []*GenericRecord) error
	Close() error
}

type BQStreamProducer added in v1.0.2

type BQStreamProducer struct {
	Opts   common.Opts
	Client BQClient
}

func NewProducer

func NewProducer(destination *backendconfig.DestinationT, o common.Opts) (*BQStreamProducer, error)

func (*BQStreamProducer) Close added in v1.0.2

func (producer *BQStreamProducer) Close() error

func (*BQStreamProducer) Produce added in v1.0.2

func (producer *BQStreamProducer) Produce(jsonData json.RawMessage, _ interface{}) (statusCode int, respStatus, responseMessage string)

type Client

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

func (*Client) Close added in v1.3.0

func (c *Client) Close() error

func (*Client) Put added in v1.3.0

func (c *Client) Put(ctx context.Context, datasetID, tableID string, records []*GenericRecord) error

type Config

type Config struct {
	Credentials string `json:"credentials"`
	ProjectId   string `json:"projectId"`
	DatasetId   string `json:"datasetId"`
	TableId     string `json:"tableId"`
}

type GenericRecord added in v1.3.0

type GenericRecord map[string]bigquery.Value

https://stackoverflow.com/questions/55951812/insert-into-bigquery-without-a-well-defined-struct

func (GenericRecord) Save added in v1.3.0

func (rec GenericRecord) Save() (map[string]bigquery.Value, string, error)

Jump to

Keyboard shortcuts

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