TheNeuralBit commented on a change in pull request #14586:
URL: https://github.com/apache/beam/pull/14586#discussion_r661786126



##########
File path: 
examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java
##########
@@ -179,14 +180,16 @@ static void runBigQueryTornadoes(Options options) {
                   BigQueryIO.readTableRows()
                       .fromQuery(options.getInputQuery())
                       .usingStandardSql()
-                      .withMethod(Method.DIRECT_READ));
+                      .withMethod(Method.DIRECT_READ)
+                      .withFormat(DataFormat.AVRO));
         } else {
           rowsFromBigQuery =
               p.apply(
                   BigQueryIO.readTableRows()
                       .from(options.getInput())
                       .withMethod(Method.DIRECT_READ)
-                      .withSelectedFields(Lists.newArrayList("month", 
"tornado")));
+                      .withSelectedFields(Lists.newArrayList("month", 
"tornado"))
+                      .withFormat(DataFormat.AVRO));

Review comment:
       Hm. So `BigQueryIO.readTableRows()` will fail now if `.withFormat()` 
isn't specified?
   This is a breaking change to the API. I think instead we should just default 
to use AVRO when format isn't specified.




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