bq

package
v0.0.0-...-128afb8 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Overview

Package bq contains helpers for uploading rows to BigQuery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogToken

func LogToken(ctx context.Context, tok proto.Message, dryRun bool) error

LogToken emits a PubSub task to record the token to the BigQuery log.

If `dryRun` is true, will just log the token to the local text log.

func RegisterTokenKind

func RegisterTokenKind(table string, prototype proto.Message)

RegisterTokenKind registers a TQ class to log a particular token kind into a particular BigQuery table.

Types

type Inserter

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

Inserter receives PubSub push messages and converts them to BQ inserts.

func NewInserter

func NewInserter(ctx context.Context, projectID string) (*Inserter, error)

NewInserter constructs an instance of Inserter.

func (*Inserter) HandlePubSubPush

func (ins *Inserter) HandlePubSubPush(ctx context.Context, body io.Reader) error

HandlePubSubPush handles incoming PubSub push request.

Jump to

Keyboard shortcuts

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