Skip to content

iFixit/avro-to-bigquery

 
 

Repository files navigation

Avro to Bigquery

CI pipeline status Contributor Covenant

About The Project

Avro to bigquery is a simple project to create a bigquery schema from an avro schema.

Getting Started

Installation`

pip install avro-to-bigquery

Usage

With avro_schema.avsc:

{
    "type": "record",
    "name": "User",
    "namespace": "example.avro",
    "fields": [
        {"name": "favorite_number", "type": "int", "doc": "Favorite number"}
    ]
}
>>> import json
>>> from pathlib import Path
>>> from avro_to_bigquery import convert_schema
>>> schema = json.loads(Path("avro_schema.avsc").read_text())
>>> print(convert_schema(schema))
(SchemaField('favorite_number', 'INTEGER', 'NULLABLE', 'Favorite number', (), ()),)

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see https://github.com/wayfair-incubator/avro-to-bigquery/blob/main/CONTRIBUTING.md

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/wayfair-incubator/avro-to-bigquery/

About

Used to convert Avro schema to BigQuery schema

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.8%
  • Shell 7.7%
  • Dockerfile 3.5%