Abacn commented on code in PR #29601:
URL: https://github.com/apache/beam/pull/29601#discussion_r1416111441
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java:
##########
@@ -158,8 +161,17 @@
* .withQuery("SELECT id, name, email FROM users"));
* }</pre>
*
- * <p>To use the Read API, specify a {@link Read#withTable(String) table name}
and a {@link
- * Read#withColumns(List) list of columns}.
+ * <p>Reads by default use the <a
+ *
href="https://cloud.google.com/spanner/docs/reads#read_data_in_parallel">PartitionQuery
API</a>
+ * which enforces some limitations on the the type of queries that can be used
so that the data can
Review Comment:
```suggestion
* which enforces some limitations on the type of queries that can be used
so that the data can
```
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java:
##########
@@ -204,6 +229,29 @@
* .withTransaction(tx));
* }</pre>
*
+ * <h4>Bulk reading of multiple queries or tables</h4>
+ *
+ * You can perform multiple consistent reads on a set of tables or using a set
of queries by
+ * constructing a {@link ReadAll} transform using {@link SpannerIO#readAll()
SpannerIO.readAll()}.
+ * This transform takes a {@link PCollection} of {@link ReadOperation}
elements, and performs the
+ * partitioned read on each of them using the same Read Only Transaction for
consistent results.
+ *
+ * <p>Note that this transform should <strong>not</strong> be used in
Streaming pipelines. This is
+ * because the same Read Only Transaction, which is created on pipeline
startup will be used for all
Review Comment:
create -> created once
Also, does pipeline startup means pipeline construction time or execution
time?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]