You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Matthew Langton <mj...@gmail.com> on 2013/11/08 08:51:14 UTC

Avro Aliases in Hive?

Hello,

Quick question about Hive and Avro.

Can I create an Avro scheme that uses aliases? I have tried a couple
different ways, but so far I have not been able to get a hive query to
return data for the aliased fields.

for instance, I have tried the following but both return default values.

{ "name": "eventtime", "type": "long", "default": 0, "aliases":
["EventTime"] },
or
{ "name": "aeventtime", "type": "long", "default": 0, "aliases":
["EventTime"] },

where my records were written with "EventTime" as the field name.

Thanks!

Re: Avro Aliases in Hive?

Posted by Jakob Homan <jg...@gmail.com>.
No, that's not supported.  The AvroSerde creates columns for each name, 
but ignores aliases.

On 11/07/2013 11:51 PM, Matthew Langton wrote:
> Hello,
>
> Quick question about Hive and Avro.
>
> Can I create an Avro scheme that uses aliases? I have tried a couple 
> different ways, but so far I have not been able to get a hive query to 
> return data for the aliased fields.
>
> for instance, I have tried the following but both return default values.
>
> { "name": "eventtime", "type": "long", "default": 0, "aliases": 
> ["EventTime"] },
> or
> { "name": "aeventtime", "type": "long", "default": 0, "aliases": 
> ["EventTime"] },
>
> where my records were written with "EventTime" as the field name.
>
> Thanks!