-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Labels
api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.Issues related to the googleapis/java-bigquerystorage API.
Description
Thanks for stopping by to let us know something could be better!
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: N/A
- Java version: N/A
- bigquerystorage version(s):
2.4.0(using bothv1andv1beta2API versions)
Steps to reproduce
- Create a bigquery table with a field with mixed case, such as
fooBar - Attempt to use
JsonStreamWriterto save a record to this table
Stack trace
com.google.api.pathtemplate.ValidationException: Field at index 3 has mismatch names (publishedAt) (publishedat)
at com.google.cloud.bigquery.storage.v1beta2.JsonToProtoMessage.convertJsonToProtoMessageImpl(JsonToProtoMessage.java:133)
at com.google.cloud.bigquery.storage.v1beta2.JsonToProtoMessage.convertJsonToProtoMessage(JsonToProtoMessage.java:86)
at com.google.cloud.bigquery.storage.v1beta2.JsonStreamWriter.append(JsonStreamWriter.java:110)
at com.google.cloud.bigquery.storage.v1beta2.JsonStreamWriter.append(JsonStreamWriter.java:90)
Any additional information below
This is because the comparison here does not take into account the fact that the protobuf schema always has lower case field names, while the the BQ table schema field may have mixed-cased field names:
Line 127 in 9d272dd
| if (!fieldSchema.getName().equals(field.getName())) { |
Metadata
Metadata
Assignees
Labels
api: bigquerystorageIssues related to the googleapis/java-bigquerystorage API.Issues related to the googleapis/java-bigquerystorage API.