This repository was archived by the owner on Feb 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
BigQuery Storage Write API: ISO 8601 timestamp not supported in JsonStreamWriter #1580
Copy link
Copy link
Labels
api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.Issues related to the googleapis/java-bigquerystorage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Environment details
- Specify the API at the beginning of the title. For example, "BigQuery: ...").
General, Core, and Other are also allowed as types - OS type and version: macOS Monterey 12.1.1
- Java version: 11.0.11
- version(s):
implementation("com.google.cloud", "google-cloud-bigquerystorage", "2.11.0")
Steps to reproduce
- Create a
JsonStreamWriter - Write a timestamp field in ISO 8601 UTC format, e.g.
2022-03-16T13:00:00Z - See that the error "Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]" is thrown
Code example
createJsonStreamWriter().use { writer ->
val json = JSONArray("""[{"id": "1", "timestamp": "2010-01-01T00:00:00Z"}]""")
val response = writer.append(json).get()
response.error.code shouldBe 0
}Stack trace
Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
at java.sql/java.sql.Timestamp.valueOf(Timestamp.java:196)
at com.google.cloud.bigquery.storage.v1.JsonToProtoMessage.fillField(JsonToProtoMessage.java:300)
at com.google.cloud.bigquery.storage.v1.JsonToProtoMessage.convertJsonToProtoMessageImpl(JsonToProtoMessage.java:177)
at com.google.cloud.bigquery.storage.v1.JsonToProtoMessage.convertJsonToProtoMessage(JsonToProtoMessage.java:116)
at com.google.cloud.bigquery.storage.v1.JsonStreamWriter.append(JsonStreamWriter.java:147)
at com.google.cloud.bigquery.storage.v1.JsonStreamWriter.append(JsonStreamWriter.java:106)
API reference
According to https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type ISO8601 string should be supported.
Any additional information below
Would also be helpful to be able to encode timestamp as ISO8601 string in protobuf.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.Issues related to the googleapis/java-bigquerystorage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.