[ https://issues.apache.org/jira/browse/BEAM-9894?focusedWorklogId=438715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-438715 ]
ASF GitHub Bot logged work on BEAM-9894: ---------------------------------------- Author: ASF GitHub Bot Created on: 29/May/20 12:43 Start Date: 29/May/20 12:43 Worklog Time Spent: 10m Work Description: purbanow commented on a change in pull request #11794: URL: https://github.com/apache/beam/pull/11794#discussion_r432456811 ########## 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: 1. I think it is more readable with separate method but i agree with you that `is odd -- the loc configuration is passed as a parameter while all the rest of the configurations are accessed as methods.` that's why I changed `checkArguments` method to stop accepting location as argument. 2. `SnowflakeIO.Read ` requires `storageIntegrationName ` to be always set but `SnowflakeIO.Write ` doesn't require that. The check against null in `SnowflakeServiceImpl` is corresponding to `SnowflakeIO.Write ` method ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 438715) Time Spent: 4h 40m (was: 4.5h) > Add batch SnowflakeIO.Write to Java SDK > --------------------------------------- > > Key: BEAM-9894 > URL: https://issues.apache.org/jira/browse/BEAM-9894 > Project: Beam > Issue Type: New Feature > Components: io-ideas > Reporter: Dariusz Aniszewski > Assignee: Pawel Urbanowicz > Priority: P2 > Time Spent: 4h 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)