[ 
https://issues.apache.org/jira/browse/BEAM-10655?focusedWorklogId=713139&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-713139
 ]

ASF GitHub Bot logged work on BEAM-10655:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jan/22 00:13
            Start Date: 22/Jan/22 00:13
    Worklog Time Spent: 10m 
      Work Description: amuletxheart commented on pull request #15485:
URL: https://github.com/apache/beam/pull/15485#issuecomment-1018985528


   @pabloem @aaltay @TheNeuralBit @chamikaramj 
   Please have a look at my latest attempt at this ticket. Added a new method 
BigQueryIO.Write.withAllowTruncatedTimestamps() and propagated the boolean into 
BigQueryUtils.toTableRow(). 
   
   Following this change, the expected behavior is: 
   1. Without the withAllowTruncatedTimestamps() option - On a row by row 
basis, if the NanosInstant contains values which are effectively microseconds 
precision (trailing 3 zeros), it will be truncated to a microsecond precision 
string when sent to BigQuery API. If the NanosInstant contains values which 
overflow (last 3 digits non zeroes), it will error out.
   2. With the withAllowTruncatedTimestamps() option - We always truncate the 
NanosInstant to microsecond precision when converting to string required by 
BigQuery API.


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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 713139)
    Time Spent: 4h 40m  (was: 4.5h)

> Cannot write "google.protobuf.Timestamp" (NanosInstant) to BigQuery through 
> schemas
> -----------------------------------------------------------------------------------
>
>                 Key: BEAM-10655
>                 URL: https://issues.apache.org/jira/browse/BEAM-10655
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Chamikara Madhusanka Jayalath
>            Priority: P2
>              Labels: stale-P2, starter
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> See here for details and instructions for reproducing.
> [https://lists.apache.org/thread.html/r1657ccf41dda3f2d9d082c5ebb006dd2da92863983971ad23485f16e%40%3Cdev.beam.apache.org%3E]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to