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]


Reply via email to