package datastoreio

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

Package datastoreio provides transformations and utilities to interact with Google Datastore. See also: https://cloud.google.com/datastore/docs.

Index

Functions

func Read

func Read(s beam.Scope, project, kind string, shards int, t reflect.Type, typeKey string) beam.PCollection

Read reads all rows from the given kind. The kind must have a schema compatible with the given type, t, and Read returns a PCollection<t>. You must also register your type with runtime.RegisterType which allows you to implement datastore.PropertyLoadSaver

Example: type Item struct {} itemKey = runtime.RegisterType(reflect.TypeOf((*Item)(nil)).Elem())

datastoreio.Read(s, "project", "Item", 256, reflect.TypeOf(Item{}), itemKey)

Types

type BoundedQuery

type BoundedQuery struct {
	Start *datastore.Key `json:"start"`
	End   *datastore.Key `json:"end"`
}

BoundedQuery represents a datastore Query with a bounded key range between [Start, End)

Source Files

datastore.go

Version
v2.66.0 (latest)
Published
Jun 23, 2025
Platform
linux/amd64
Imports
14 packages
Last checked
1 day ago

Tools for package owners.