avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Kenworthy <adwkenwor...@yahoo.com>
Subject Exposing a constant in an Avro Schema
Date Mon, 14 Nov 2011 16:03:23 GMT

I would like to "embed" a schema version number in the schema that I use for writing data:
it would be read-only so that I can determine later on which version of my avro schema was
used. The best I could come up with is to (ab)use an enum with a single value like this, as
I couldn't find any way to define a constant:

{"type":"enum","name":"version_1_1","doc":"enum indicating avro write schema version 1.1","symbols":["VERSION_1_1"]}

Is there a better way to register a constant value that has no meaning within the avro data
file, other than to expose some kind of meta information?


Andrew Kenworthy

View raw message