Documentation ¶
Overview ¶
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 ¶
- func Query(s beam.Scope, driver, dsn, q string, t reflect.Type) beam.PCollection
- func Read(s beam.Scope, driver, dsn, table string, t reflect.Type) beam.PCollection
- func Write(s beam.Scope, driver, dsn, table string, columns []string, ...)
- func WriteWithBatchSize(s beam.Scope, batchSize int, driver, dsn, table string, columns []string, ...)
- type MapLoader
- type SliceLoader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Query ¶
Query executes a query. The output must have a schema compatible with the given type, t. It returns a PCollection<t>.
func Read ¶
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 ¶
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 ¶
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.
Types ¶
type SliceLoader ¶
SliceLoader calls LoadSlice method with a fetched row as slice.