beam: github.com/apache/beam/sdks/go/pkg/beam/io/databaseio Index | Files

package databaseio

import "github.com/apache/beam/sdks/go/pkg/beam/io/databaseio"

Package databaseio provides transformations and utilities to interact with generic database database/sql API. See also: https://golang.org/pkg/database/sql/

Package databaseio provides transformations and utilities to interact with generic database database/sql API. See also: https://golang.org/pkg/database/sql/

Package databaseio provides transformations and utilities to interact with generic database database/sql API. See also: https://golang.org/pkg/database/sql/

Package databaseio provides transformations and utilities to interact with generic database database/sql API. See also: https://golang.org/pkg/database/sql/

Package databaseio provides transformations and utilities to interact with generic database database/sql API. See also: https://golang.org/pkg/database/sql/

Index

Package Files

database.go loader.go mapper.go util.go writer.go

func Query Uses

func Query(s beam.Scope, driver, dsn, q string, t reflect.Type) beam.PCollection

Query executes a query. The output must have a schema compatible with the given type, t. It returns a PCollection<t>.

func Read Uses

func Read(s beam.Scope, driver, dsn, 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 Write Uses

func Write(s beam.Scope, driver, dsn, table string, columns []string, col beam.PCollection)

Write writes the elements of the given PCollection<T> to database, if columns left empty all table columns are used to insert into, otherwise selected

func WriteWithBatchSize Uses

func WriteWithBatchSize(s beam.Scope, batchSize int, driver, dsn, table string, columns []string, col beam.PCollection)

WriteWithBatchSize writes the elements of the given PCollection<T> to database with custom batch size. Batch size control number of elements in the batch INSERT statement.

type MapLoader Uses

type MapLoader interface {
    LoadMap(row map[string]interface{}) error
}

MapLoader calls on LoadMap method with with a fetched row as map.

type SliceLoader Uses

type SliceLoader interface {
    LoadSlice(row []interface{}) error
}

SliceLoader calls LoadSlice method with a fetched row as slice.

type Writer Uses

type Writer interface {
    SaveData() (map[string]interface{}, error)
}

Writer returns a row of data to be inserted into a table.

Package databaseio imports 10 packages (graph). Updated 2020-06-12. Refresh now. Tools for package owners.