Du Liu created BEAM-13990:
-----------------------------

             Summary: BigQueryIO cannot write to DATE and TIMESTAMP columns 
when using Storage Write API 
                 Key: BEAM-13990
                 URL: https://issues.apache.org/jira/browse/BEAM-13990
             Project: Beam
          Issue Type: Bug
          Components: io-java-gcp
    Affects Versions: 2.36.0
            Reporter: Du Liu


when using Storage Write API with BigQueryIO, DATE and TIMESTAMP values are 
currently converted to String type in protobuf message. This is incorrect, 
according to storage write api 
[documentation|[https://cloud.google.com/bigquery/docs/write-api#data_type_conversions],]
 DATE should be converted to int32 and TIMESTAMP should be converted to int64.

Here's error message: 

INFO: Stream finished with error 
com.google.api.gax.rpc.InvalidArgumentException: 
io.grpc.StatusRuntimeException: INVALID_ARGUMENT: The proto field mismatched 
with BigQuery field at D6cbe536b_4dab_4292_8fda_ff2932dded49.datevalue, the 
proto field type string, BigQuery field type DATE Entity



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

Reply via email to