ahmedabu98 commented on code in PR #28124:
URL: https://github.com/apache/beam/pull/28124#discussion_r1304471807
##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiSinkRowUpdateIT.java:
##########
@@ -130,16 +101,19 @@ public void testCdc() throws Exception {
new TableRow().set("key1", "foo4").set("key2",
"bar4").set("value", "1"),
RowMutationInformation.of(RowMutationInformation.MutationType.DELETE, 1)));
- String tableSpec = createTable(tableSchema, Lists.newArrayList("key1",
"key2"));
+ List<String> primaryKey = Lists.newArrayList("key1", "key2");
+ String tableSpec = getTablespec();
Pipeline p = Pipeline.create();
p.apply("Create rows", Create.of(items))
.apply(
"Apply updates",
BigQueryIO.applyRowMutations()
.to(tableSpec)
.withSchema(tableSchema)
+ .withPrimaryKey(primaryKey)
+ .withClustering(new Clustering().setFields(primaryKey))
Review Comment:
If clustering is indeed needed though, it would be good to update the use
cases in BigQueryIO.java doc comments
--
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]