googleapis / googleapis/google-cloud-go
bigquery: infer schema from protoc generated struct
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
## Client
BigQuery
## Describe Your Environment
macOS 10.13.6
## Expected Behavior
`bigquery.InferSchema()` works for structs generated using protoc.
## Actual Behavior
`googleapi: Error 400: Field EventTime.XXX_NoUnkeyedLiteral is type RECORD but has no schema, invalid`
The protobuf compiler generates the following field when generating a Go struct:
```
XXX_NoUnkeyedLiteral struct{} `json:"-"`
```
This field prevents me from inferring the BigQuery schema from the struct. It would be nice to be able to infer the schema from structs generated by the protobuf compiler. Otherwise I'd have to manually specify the schema, which means that I also need to keep it in sync with any changes made to the protobuf message.
Contributor guide
Assessment
This issue has not been assessed yet.