MiguelAnzoWizeline commented on a change in pull request #14586:
URL: https://github.com/apache/beam/pull/14586#discussion_r661791794
##########
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:
Yes, by the recent change on throwing IllegalArgument when format is
unspecified. I will change the default to AVRO then. The explicit
`.withFormat()` to the test should be kept anyway? or also removed?
--
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]