bigquery

package
v0.0.0-...-fe83e8f Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScanRecords

func ScanRecords(reader *bufio.Reader, ch chan<- map[string]bq.JsonValue) error

Types

type AttributeIdentity

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

func NewAttributeIdentity

func NewAttributeIdentity(name string) *AttributeIdentity

func (*AttributeIdentity) Identity

func (a *AttributeIdentity) Identity(m map[string]bq.JsonValue) (string, error)

type Client

type Client struct {
}

func New

func New() *Client

func (*Client) DestinationExists

func (c *Client) DestinationExists(dest *Destination) (bool, error)

type Destination

type Destination struct {
	ProjectID string
	DatasetID string
	TableID   string
	Suffix    string
}

type EmptyIdentity

type EmptyIdentity struct{}

func NewEmptyIdentity

func NewEmptyIdentity() *EmptyIdentity

func (*EmptyIdentity) Identity

func (e *EmptyIdentity) Identity(m map[string]bq.JsonValue) (string, error)

type Inserter

type Inserter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewInserter

func NewInserter(opts *InserterOpts) (*Inserter, error)

func (*Inserter) Flush

func (i *Inserter) Flush() error

func (*Inserter) Insert

func (i *Inserter) Insert(record map[string]bq.JsonValue) error

func (*Inserter) InsertedRows

func (i *Inserter) InsertedRows() int64

type InserterOpts

type InserterOpts struct {
	Destination    *Destination
	Identity       RowIdentity
	IgnoreUnknowns bool
	FlushSize      int
}

type RowIdentity

type RowIdentity interface {
	Identity(map[string]bq.JsonValue) (string, error)
}

Jump to

Keyboard shortcuts

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