This libs works to convert a json schema to a glue schema struct.
Project description
Jsonschema to Glue struct
A small library that works to read your provided jsonschema and convert it to a glue struct model, in this way you can integrate it in your pipeline or uses it just to get a output and insert manually in your glue table schema.
Installation
pip install glue-struct-transform
Get Started
How to convert a jsonchema to a glue struct schema using this lib
import json
from glue_struct_transform import GlueStructTransform
# Read or set your json schema
schema = open(f'YOUR_JSON_SCHEMA.json',)
schemaLoad = json.load(schema)
# Pass your json schema in dict type to the function
result = GlueStructTransform.json_schema_to_glue_struct(schemaLoad)
Conversions implementation status
|Json Schema Type |Glue Schema type | Implementation status |Version
|-------------------------|---------------------|---------------|----------
|string |string |implemented
|0.1.0
|number |double |implemented
|0.1.0
|integer |int |implemented
|0.1.0
|object |struct |implemented
|0.1.0
|array |array |implemented
|0.1.0
|boolean |boolean |implemented
|0.1.0
|null |Raises exception |implemented
|0.1.2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for glue-struct-transform-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49c9821f65dbd73151ebf40b5a15a02e4615c4ccd60e72ac6e4e418351b533fc |
|
MD5 | f17e14e17b6930244af91ee76abd9a5e |
|
BLAKE2b-256 | 2fcd9d8b2a0181b1db3960c31a357302b895e950edf4bb7a4f35dfe7b232f597 |
Hashes for glue_struct_transform-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c08df05152b8584b1f49e1d9fa1c7cf1828a10a5b6f3b09b1ff3a58ac4f9452 |
|
MD5 | ee6f8b8f29cd64a03ba49fe53cf603f3 |
|
BLAKE2b-256 | a135bb4c89999b0a4762dea8ee42847622833c0ec82e6d8b974658175e14a313 |