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


##########
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 sounds like it might be safer to leave clustering here for now - I think 
BigQuery is in the process of removing this restriction, but it might not be 
completely 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