avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lloyd Haris <lloydha...@gmail.com>
Subject How do I create nested datums in python-avro
Date Tue, 17 May 2016 13:10:06 GMT
I have an avro schema which is deeply nested. It has records inside records
for example.

In Java I can create a GenericRecord and call put() method to put another
record in the main record for example.

Is there a way to do such things in python? It looks like I have to create
dictionaries by hand and put values in it according to the schema which is
very difficult when you have a deeply nested schema.

I can also see that we can create different types of schemas in python-avro
such as map schema, array schema, record schema etc. but I couldn't figure
out a way to combine several such schema's to create a bigger nested schema.

Can someone please tell me how to create a nested schema from sub schemas
and then create datums for those sub schemas and append them to create the
nested object if it's possible?

If it's not doable, how do you create deeply nested schemas and then write
datums according to those schemas in python?

Thank you
Lloyd

Mime
View raw message