Tools to convert from and to Avro Schema from various other schema languages.
Project description
Avrotize
Avrotize is a command-line tool that allows you to convert between different schema formats. It is designed to be easy to use and flexible, supporting a variety of use cases.
Supported conversions to Avro Schema:
- JSON Schema
- XML Schema (XSD)
- Protocol Buffers
- ASN.1
Supported conversions from Avro Schema:
- Kusto Data Table Definition (KQL)
- T-SQL Table Definition (SQL)
- Apache Parquet files
- Protocol Buffers
Installation
You can install Avrotize from PyPI:
pip install avrotize
Usage
Avrotize provides several commands for converting between different schema formats.
Convert Proto schema to Avro schema
avrotize p2a --proto <path_to_proto_file> --avsc <path_to_avro_schema_file>
Convert Avro schema to Proto schema
avrotize a2p --proto <path_to_proto_file> --avsc <path_to_avro_schema_file>
Convert JSON schema to Avro schema
avrotize j2a --jsons <path_to_json_schema_file> --avsc <path_to_avro_schema_file> [--namespace <avro_schema_namespace>]
Convert XML Schema (XSD) to Avro schema
avrotize x2a --xsd <path_to_xsd_file> --avsc <path_to_avro_schema_file> [--namespace <avro_schema_namespace>]
Convert Avro schema to Kusto table declaration
avrotize a2k --avsc <path_to_avro_schema_file> --kusto <path_to_kusto_kql_file> [--record-type <record_type>]
Convert Avro schema to T-SQL table definition
avrotize a2tsql --avsc <path_to_avro_schema_file> --tsql <path_to_sql_file> [--record-type <record_type>]
Convert Avro schema to empty Parquet file
avrotize a2pq --avsc <path_to_avro_schema_file> --parquet <path_to_parquet_schema_file>
Convert ASN.1 schema to Avro schema
avrotize asn2a --asn <path_to_asn1_schema_file> --avsc <path_to_avro_schema_file>
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
Avrotize is released under the Apache License. See the LICENSE file for more details.
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
avrotize-0.7.1.tar.gz
(29.2 kB
view hashes)
Built Distribution
avrotize-0.7.1-py3-none-any.whl
(40.2 kB
view hashes)