reuvenlax commented on code in PR #28124:
URL: https://github.com/apache/beam/pull/28124#discussion_r1303735294


##########
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:
   It was at the time I wrote the test, though I think BQ plans to remove this 
restriction. I'm not sure if it's been removed yet.



-- 
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]

Reply via email to