You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "remko (via GitHub)" <gi...@apache.org> on 2025/09/04 19:58:00 UTC
Re: [I] datastoreio doesn't work with entities containing keys [beam]
remko commented on issue #18995:
URL: https://github.com/apache/beam/issues/18995#issuecomment-3255391557
The JIRA ticket says:
```
This issue was marked "stale-P2" and has not received a public comment in 14 days. It is now automatically moved to P3. If you are still affected by it, you can comment and move it back to P2.
```
I am affected by this, so should this become a P2 again? I'm unable to use the datastore connector because almost all my kinds have embedded Keys in them, and I get a stack overflow when starting the pipeline.
This is my program:
```
package main
import (
"context"
"reflect"
"cloud.google.com/go/datastore"
"github.com/apache/beam/sdks/v2/go/pkg/beam"
"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime"
"github.com/apache/beam/sdks/v2/go/pkg/beam/io/datastoreio"
"github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism"
_ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/gcs"
_ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/local"
)
type Foo struct {
Bar *datastore.Key `datastore:"bar"`
}
var fooKey string
func init() {
fooKey = runtime.RegisterType(reflect.TypeOf((*Foo)(nil)).Elem())
}
func main() {
beam.Init()
p := beam.NewPipeline()
s := p.Root()
datastoreio.Read(s, "myproject", "Foo", 256, reflect.TypeOf(Foo{}), fooKey)
prism.Execute(context.Background(), p)
}
```
I attached the output of the command.
[stack.txt](https://github.com/user-attachments/files/22146666/stack.txt)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org