You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 16:22:33 UTC

[GitHub] [beam] damccorm opened a new issue, #20243: BigQueryUtils DATETIME conversion requires unix millis

damccorm opened a new issue, #20243:
URL: https://github.com/apache/beam/issues/20243

   I'm trying to run a very simple GCP Dataflow SQL job (copy all columns from table A to B), and it's failing with the following exception:
   ```
   
   Caused by: java.lang.ClassCastException: org.apache.avro.util.Utf8 cannot be cast to java.lang.Longat org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils.truncateToMillis (BigQueryUtils.java:643)at org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils.convertAvroFormat (BigQueryUtils.java:597)at org.apache.beam.sdk.io.gcp.bigquery.BigQueryUtils.lambda$toBeamRow$5 (BigQueryUtils.java:389)
   
   ```
   
   It looks to me like this is because BigQueryUtils.convertAvroFormat expects that any value whose (beam) type is "DATETIME" must be expressed in unix millis. However, these values come out of BigQuery as a string, (AFAICT) in ISO 8601 format.
   
   Imported from Jira [BEAM-10021](https://issues.apache.org/jira/browse/BEAM-10021). Original Jira may contain additional context.
   Reported by: benbirt.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org