'BigQuery storage write API Datetime
I'm trying to send datetime to bigquery with storage write API.
My BQ model has a datetime column. I parse my java model with Jackson to json, resolving to this (try both ways with escaped literal):
{"last_updated":"2021-09-20T10:15:26.796731"}
{"last_updated":"'2021-09-20T10:15:26.796731'"}
And bigquery returns this error.
JSONObject does not have a int64 field at root.last_updated.
As I read in the documentation, it should support string literals as datetime: https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#datetime_literals
Solution 1:[1]
There was a similar Github issue: https://github.com/googleapis/java-bigquerystorage/issues/1330
It's been fixed in v2.3.3 onwards. So updating the Java client library version should resolve this issue.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
