beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [1/2] beam git commit: Fixes BigQueryIO.Write javadoc for to(ValueInSingleWindow)
Date Thu, 27 Jul 2017 21:42:26 GMT
Repository: beam
Updated Branches:
  refs/heads/master 892a2cf5b -> 5727ad28f


Fixes BigQueryIO.Write javadoc for to(ValueInSingleWindow)


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/0249da51
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/0249da51
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/0249da51

Branch: refs/heads/master
Commit: 0249da517c84e6ae609a95f20b37c50c0cc46d11
Parents: 892a2cf
Author: Eugene Kirpichov <kirpichov@google.com>
Authored: Wed Jul 26 10:45:09 2017 -0700
Committer: Eugene Kirpichov <kirpichov@google.com>
Committed: Thu Jul 27 14:41:29 2017 -0700

----------------------------------------------------------------------
 .../org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java     | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/0249da51/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
index cc288e1..7ca4ce2 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
@@ -185,13 +185,16 @@ import org.slf4j.LoggerFactory;
  * quotes.apply(Window.<TableRow>into(CalendarWindows.days(1)))
  *       .apply(BigQueryIO.writeTableRows()
  *         .withSchema(schema)
- *         .to(new SerializableFunction<ValueInSingleWindow, String>() {
- *           public String apply(ValueInSingleWindow value) {
+ *         .to(new SerializableFunction<ValueInSingleWindow<TableRow>, TableDestination>()
{
+ *           public TableDestination apply(ValueInSingleWindow<TableRow> value) {
  *             // The cast below is safe because CalendarWindows.days(1) produces IntervalWindows.
  *             String dayString = DateTimeFormat.forPattern("yyyy_MM_dd")
  *                  .withZone(DateTimeZone.UTC)
  *                  .print(((IntervalWindow) value.getWindow()).start());
- *             return "my-project:output.output_table_" + dayString;
+ *             return new TableDestination(
+ *                 "my-project:output.output_table_" + dayString, // Table spec
+ *                 "Output for day " + dayString // Table description
+ *               );
  *           }
  *         }));
  * }</pre>


Mime
View raw message