0

我正在运行一个数据流作业(Apache Beam SDK 2.1.0 Java,Google 数据流运行器),我需要从 Google DataStore 中“清楚地”读取一个特定属性。(就像 SQL 中古老的“DISTINCT”关键字一样)。这是我的代码片段:

Query.Builder q = Query.newBuilder();
q.addKindBuilder().setName("student-records");
q.addDistinctOn(PropertyReference.newBuilder().setName("studentId").build());
pipeline.apply(DatastoreIO.v1().read().withProjectId("project-id").withQuery(q.build()));
pipelilne.run();

当管道运行时,read() 由于以下错误而失败:

java.lang.RuntimeException: org.apache.beam.sdk.util.UserCodeException: com.google.datastore.v1.client.DatastoreException:当按属性设置分组时,上的不等式过滤器也必须是按属性分组。,代码=INVALID_ARGUMENT

有人可以告诉我哪里出错了。

4

0 回答 0