protoc-gen-bq-schema helps you to send your Protocol Buffer messages to BigQuery
2.0K
See chuhlomin/protoc-gen-bq-schema GitHub repository which is a fork of original GoogleCloudPlatform/protoc-gen-bq-schema.
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.
FROM alpine:3.10.3 as alpine
# Install protoc v3.6.1-r1
# and get Google Protobuf files
RUN apk add --no-cache protobuf curl && \
mkdir -p /protobuf/google/protobuf && \
for f in any duration descriptor empty struct timestamp wrappers; do \
curl -L -o /protobuf/google/protobuf/${f}.proto https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/${f}.proto; \
done && \
apk del curl
COPY bin/protoc-gen-go bin/protoc-gen-bq-schema /usr/bin/
ENTRYPOINT ["/usr/bin/protoc", "-I/protobuf"]
Example usage:
docker run -i -t -v $(pwd):/workdir chuhlomin/protoc-gen-bq-schema:latest -I/workdir -I/workdir/bq --bq-schema_out=/workdir/bq_schema /workdir/Bar.proto
Content type
Image
Digest
Size
11.4 MB
Last updated
almost 6 years ago
docker pull chuhlomin/protoc-gen-bq-schema