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


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -3254,9 +3270,12 @@ && getStorageApiTriggeringFrequency(bqOptions) != null) {
       if (getRowMutationInformationFn() != null) {
         checkArgument(getMethod() == Method.STORAGE_API_AT_LEAST_ONCE);
         checkArgument(
-            getCreateDisposition() == CreateDisposition.CREATE_NEVER,
-            "CREATE_IF_NEEDED is not supported when applying row updates. 
Tables must be precreated "
-                + "with a primary key specified.");
+            getCreateDisposition() == CreateDisposition.CREATE_NEVER || 
getPrimaryKey() != null,
+            "If specifying CREATE_IF_NEEDED along with row updates, a primary 
key needs to be specified");
+      }
+      if (getPrimaryKey() != null) {
+        checkArgument(
+            getMethod() != Method.FILE_LOADS, "Primary key not supported when 
using FILE_LOADS");

Review Comment:
   Ah I see the changes in `CreateTables` are for streaming inserts



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