jst 1.10.0

Creator: bigcodingguy24

Last updated:

Add to Cart

Description:

jst 1.10.0

jsonschema-transpiler
A tool for transpiling JSON Schema into schemas for
Avro and
BigQuery.
Installation
pip install jst

Usage
import json
import jst


json_schema = {
"items": {
"properties": {
"field_1": {"type": "string"},
"field_2": {"type": "integer"},
},
"type": "object",
},
"type": "array",
}
bq_schema = json.loads(jst.convert_bq(json.dumps(json_schema)))

assert bq_schema == [
{
"fields": [
{"mode": "NULLABLE", "name": "field_1", "type": "STRING"},
{"mode": "NULLABLE", "name": "field_2", "type": "INT64"},
],
"mode": "REPEATED",
"name": "root",
"type": "RECORD",
}
]

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.