[
https://issues.apache.org/jira/browse/BEAM-6749?focusedWorklogId=205303&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-205303
]
ASF GitHub Bot logged work on BEAM-6749:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Feb/19 18:40
Start Date: 27/Feb/19 18:40
Worklog Time Spent: 10m
Work Description: chamikaramj commented on pull request #7958:
[BEAM-6749] Update BQ tornadoes example to use the storage API.
URL: https://github.com/apache/beam/pull/7958#discussion_r260887614
##########
File path:
examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java
##########
@@ -148,13 +151,23 @@ public void processElement(ProcessContext c) {
static void runBigQueryTornadoes(Options options) {
Pipeline p = Pipeline.create(options);
+ // Build the read options proto for the read operation.
+ TableReadOptions tableReadOptions =
+ TableReadOptions.newBuilder()
+ .addAllSelectedFields(Lists.newArrayList("month", "tornado"))
+ .build();
+
// Build the table schema for the output table.
List<TableFieldSchema> fields = new ArrayList<>();
fields.add(new TableFieldSchema().setName("month").setType("INTEGER"));
fields.add(new
TableFieldSchema().setName("tornado_count").setType("INTEGER"));
TableSchema schema = new TableSchema().setFields(fields);
- p.apply(BigQueryIO.readTableRows().from(options.getInput()))
+ p.apply(
Review comment:
(Till we have dynamic work rebalancing support and ready to declare storage
API as the default for production use.)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 205303)
Time Spent: 2h (was: 1h 50m)
> Add BigQuery Storage API info to docs
> -------------------------------------
>
> Key: BEAM-6749
> URL: https://issues.apache.org/jira/browse/BEAM-6749
> Project: Beam
> Issue Type: Improvement
> Components: website
> Reporter: Melissa Pashniak
> Assignee: Melissa Pashniak
> Priority: Minor
> Time Spent: 2h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)