A protoc plugin that generates json-formatted Hive schemas from protobuf files. See examples.
Json is a convenient format to intereact with the AWS Glue API and create/update tables in the AWS Glue Data Catalog.
go get github.com/simo7/protoc-gen-hive
Alternatively clone the repo and build the plugin:
go build -o bin/protoc-gen-hive .
export PATH=$PWD/bin:$PATH
protoc \
--hive_out=./ \
--hive_opt=paths=source_relative \
examples/person.proto
Reference: https://developers.google.com/protocol-buffers/docs/reference/google.protobuf.
The following types are supported:
-
google.protobuf.Timestamp
It's tested against the new protobuf API google.golang.org/protobuf
or version 1.4.0
of the legacy API github.com/golang/protobuf
.