You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "liferoad (via GitHub)" <gi...@apache.org> on 2023/05/30 19:03:50 UTC

[GitHub] [beam] liferoad commented on a diff in pull request #25195: Fixing a table existence verifier for BQ

liferoad commented on code in PR #25195:
URL: https://github.com/apache/beam/pull/25195#discussion_r1210706423


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryHelpers.java:
##########
@@ -593,10 +593,15 @@ static String getDatasetLocation(
 
   static void verifyTablePresence(DatasetService datasetService, TableReference table) {
     try {
-      datasetService.getTable(table);
+      Table fetchedTable = datasetService.getTable(table);
+      if (fetchedTable == null) {
+        throw new IOException("Table does not exist.");

Review Comment:
   can we print the table name as well? or may be add some actionable steps for users to take like create the table first with the right schema?



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org