luci: go.chromium.org/luci/tools/cmd/bqschemaupdater Files

Command bqschemaupdater

Command bqschemaupdater accepts location and schema of a BigQuery table and creates or updates the table.

When converting a proto message to BigQuery schema, in the order of precedence:

- one message field becomes at most one BigQuery field
- if a field has leading comments, common indentation is trimmed
  and the result becomes the BigQuery field description
- if a field is of enum type, the BigQuery type is string
  and valid values are appended to the BigQuery field description
- if a field is google.protobuf.Timestamp, the BigQuery type is TIMESTAMP
- if a field is google.protobuf.Struct, is is persisted as a JSONPB string.
- if a field is of message type, the BigQuery type is RECORD
  with schema corresponding to the proto field type, recursively.
  However, if the resulting RECORD schema is empty, the field is omitted.

Package Files

doc.go local_table_store.go main.go schema.go table_store.go

Package main imports 27 packages (graph). Updated 2018-12-14. Refresh now. Tools for package owners.