protoc-gen-bq-schema is a plugin for ProtocolBuffer compiler.
It converts messages written in .proto format into schema files in JSON for BigQuery.
So you can reuse existing data definitions in .proto for BigQuery with this plugin.
Command Line Interface Installation
These options are usable, manually from the command line by invoking protoc.
These ARE NOT required when using Bazel.
go install github.com/rrmcguinness/protoc-gen-bq-schema@latest
protoc and protoc-gen-bq-schema commands must be found in $PATH.
Output
The generated JSON schema files are suffixed with .schema and their base names
are named after their package names and bq_table_name options.
If you do not already have the standard google protobuf libraries in your
proto_path, you’ll need to specify them directly on the command line
(and potentially need to copy bq_schema.proto into a proto_path directory
as well), like this: