Sign inSign up

darahsan/jsonschema2bqschema

By darahsan

•Updated over 7 years ago

JSON Schema to BQ Schema

Image
0

1.1K

darahsan/jsonschema2bqschema repository overview

⁠Json schema to BQ Schema

This is a container packaging jsonschema-bigquery⁠ to generate BQ Schema from JSON Schema⁠. Purpose of this pacakge is to provide convenience of avoiding installing all tools and requirements to use jsonschema-bigquery to generate bigquery schema from JSON schema

⁠To build on local

docker build --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -t darahsan/jsonschema2bqschema:latest .

docker run -i darahsan/jsonschema2bqschema:latest < input-schema.json > output-bq-schema.json

docker run -i -e OPTIONS='--preventAdditionalObjectProperties' darahsan/jsonschema2bqschema:latest < input-schema.json > output-bq-schema.json

jsonschema2bqschema variable takes jsonschema-bigquery options and input json schema. It doesn't take -p -d flags as its not intended to interact with Google BigQuery when generating BQ schema.

⁠To run via docker on your files locally

docker run -i darahsan/jsonschema2bqschema:latest < input-schema.json > output-bq-schema.json

docker run -i -e OPTIONS='--preventAdditionalObjectProperties' darahsan/jsonschema2bqschema:latest < input-schema.json > output-bq-schema.json

⁠To go inside the container for fun or else

docker-compose up

docker exec -it jsonschema2bqschema sh

Tag summary

Content type

Image

Digest

Size

91.4 MB

Last updated

over 7 years ago

docker pull darahsan/jsonschema2bqschema