Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 910 Bytes

README.md

File metadata and controls

44 lines (37 loc) · 910 Bytes

Quickstart

The purpose of this module is to convert Google Protocol Buffer files to Apache Avro files. The following example demonstrates how to use the parser:

$ python parser.py -f helloworld.proto --out helloworld.avro

Given that the input file is helloworld.proto:

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

The output will be helloworld.avro:

[
    {
        "type": "record",
        "name": "HelloRequest",
        "fields": [
            {
                "type": "String",
                "name": "name"
            }
        ]
    },
    {
        "type": "record",
        "name": "HelloReply",
        "fields": [
            {
                "type": "String",
                "name": "message"
            }
        ]
    }
]