purbanow commented on a change in pull request #11794:
URL: https://github.com/apache/beam/pull/11794#discussion_r432437111



##########
File path: 
sdks/java/io/snowflake/src/main/java/org/apache/beam/sdk/io/snowflake/SnowflakeIO.java
##########
@@ -339,10 +360,31 @@
       emptyCollection
           .apply(Wait.on(output))
           .apply(ParDo.of(new CleanTmpFilesFromGcsFn(stagingBucketDir)));
-
       return output;
     }
 
+    private void checkArguments(Location loc) {
+      // Either table or query is required. If query is present, it's being 
used, table is used
+      // otherwise
+      checkArgument(loc != null, "via() is required");
+      checkArgument(
+          loc.getStorageIntegrationName() != null,

Review comment:
       I think keeping this part of code in separate method makes code more 
readable. 
   
   I agree with you about that `is odd -- the loc configuration is passed as a 
parameter while all the rest of the configurations are accessed as methods`
   
   I changed `checkArguments` method  to stop  accepting location as argument. 
WDYT?
   
   Yes , `storageIntegrationName` must not be null . Thanks for spotting this 
:) 
   
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to