avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Galiegue <fgalie...@gmail.com>
Subject Re: Anonymous record schemas in data files
Date Mon, 04 Mar 2013 09:34:44 GMT
On Mon, Mar 4, 2013 at 8:50 AM, Eric Sammer <esammer@cloudera.com> wrote:
> All:
> I'm looking for some clarity on the use of anonymous records in Avro data
> files. Is this considered legal? 1.7.3 allows one to write a data file with
> DataFileWriter with an anonymous record schema that can't be read back which
> is not the nicest behavior. Here's a contrived example of a data file:
> esammer:~/ esammer$ ~/bin/avro-tool getmeta 1362381940987-1
> Exception in thread "main" org.apache.avro.SchemaParseException: No name in
> schema: {"type":"record","fields":[{"name":"word","type":"string"}]}

Records must have a name.
http://avro.apache.org/docs/current/spec.html#schema_record says so.

Francis Galiegue, fgaliegue@gmail.com
JSON Schema in Java: http://json-schema-validator.herokuapp.com

View raw message