[
https://issues.apache.org/jira/browse/BEAM-7326?focusedWorklogId=263846&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-263846
]
ASF GitHub Bot logged work on BEAM-7326:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Jun/19 15:24
Start Date: 20/Jun/19 15:24
Worklog Time Spent: 10m
Work Description: tvalentyn commented on pull request #8873: [BEAM-7326]
add documentation bigquery data types
URL: https://github.com/apache/beam/pull/8873#discussion_r295861914
##########
File path: website/src/documentation/io/built-in-google-bigquery.md
##########
@@ -163,6 +163,29 @@ table that you want to write to, unless you specify a
[create
disposition](#create-disposition) of `CREATE_NEVER`. [Creating a table
schema](#creating-a-table-schema) covers schemas in more detail.
+### Data types
+
+BigQuery supports the following data types: STRING, BYTES, INTEGER, FLOAT,
+NUMERIC, BOOLEAN, TIMESTAMP, DATE, TIME, DATETIME and GEOGRAPHY.
+All possible values are described at
[https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types]
(https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).
+BigQueryIO allows you to use all of these data types. The following examples
+shows the correct format for data types used when reading from and writing to
+BigQuery:
+
+```java
+{% github_sample
/apache/beam/blob/master/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java
tag:BigQueryDataTypes
Review comment:
Hi @melap - does the code snippet change formatting look good to you? For
some reason we don't see it in the preview.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 263846)
Time Spent: 2h 10m (was: 2h)
> Document that Beam BigQuery IO expects users to pass base64-encoded bytes,
> and BQ IO serves base64-encoded bytes to the user.
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: BEAM-7326
> URL: https://issues.apache.org/jira/browse/BEAM-7326
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp, io-python-gcp
> Reporter: Valentyn Tymofieiev
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> BYTES is one of the Datatypes supported by Google Cloud BigQuery, and Apache
> Beam BigQuery IO connector.
> Current implementation of BigQuery connector in Java and Python SDKs expects
> that users base64-encode bytes before passing them to BigQuery IO, see
> discussion on dev: [1]
> This needs to be reflected in public documentation, see [2-4]
> cc: [~juta] [~chamikara] [~pabloem]
> cc: [~lostluck] [~kedin] FYI and to advise whether similar action needs to be
> done for Go SDK and/or Beam SQL.
> [1]
> https://lists.apache.org/thread.html/f35c836887014e059527ed1a806e730321e2f9726164a3030575f455@%3Cdev.beam.apache.org%3E
> [2] https://beam.apache.org/documentation/io/built-in/google-bigquery/
> [3]
> https://beam.apache.org/releases/pydoc/2.12.0/apache_beam.io.gcp.bigquery.html
> [4]
> https://beam.apache.org/releases/javadoc/2.12.0/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.html
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)