spannerio

package
v2.44.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0, BSD-3-Clause, MIT Imports: 9 Imported by: 1

Documentation

Overview

Package spannerio provides an API for reading and writing resouces to Google Spanner datastores.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

func Query(s beam.Scope, database string, q string, t reflect.Type, options ...func(*queryOptions) error) beam.PCollection

Query executes a query. The output must have a schema compatible with the given type, t. It returns a PCollection<t>. Note: Query will be executed on a single worker. Consider performance of query and if downstream splitting is required add beam.Reshuffle.

func Read

func Read(s beam.Scope, database string, table string, t reflect.Type) beam.PCollection

Read reads all rows from the given table. The table must have a schema compatible with the given type, t, and Read returns a PCollection<t>. If the table has more rows than t, then Read is implicitly a projection.

func UseBatchSize

func UseBatchSize(batchSize int) func(qo *writeOptions) error

UseBatchSize explicitly sets the batch size per transaction for writes

func Write

func Write(s beam.Scope, database string, table string, col beam.PCollection, options ...func(*writeOptions) error)

Write writes the elements of the given PCollection<T> to spanner. T is required to be the schema type. Note: Writes occur against a single worker machine.

Types

This section is empty.

Jump to

Keyboard shortcuts

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