You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 both v1 and v1beta2 API versions)
Steps to reproduce
Create a bigquery table with a field with mixed case, such as fooBar
Attempt to use JsonStreamWriter to 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:
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigquerystorage/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
Fixes#1366☕️
Thanks for stopping by to let us know something could be better!
Environment details
General, Core, and Other are also allowed as types
2.4.0
(using bothv1
andv1beta2
API versions)Steps to reproduce
fooBar
JsonStreamWriter
to save a record to this tableStack trace
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:
java-bigquerystorage/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/JsonToProtoMessage.java
Line 127 in 9d272dd
The text was updated successfully, but these errors were encountered: