avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Handling field names when serializing and deserializing JSON
Date Tue, 14 Jan 2014 22:32:27 GMT
On Tue, Jan 14, 2014 at 2:06 PM, Pritchard, Charles X. -ND
<Charles.X.Pritchard.-ND@disney.com> wrote:
> Do I just pop the “original” field name in as an alias and use the “safe”
> (alphanumeric+underscore) one as the primary name?

I'm not exactly sure what you're trying to do.  Aliases in the
reader's schema are matched to names in the writer's schema.  So if
you have Avro data with names that are illegal in Hive then you could
provide Hive with a safely-named schema to use when reading these that
has the original name as an alias.  Conversely, if Hive writes data
with the "safe" name that you want to read as data using the original
name, then you'd read with the safe name in an alias.  Does that make


View raw message