Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro, mail # user - How to avro data to hive


Copy link to this message
-
How to avro data to hive
sourabh chaki 2013-03-20, 14:36
Hi All,

>
> In my application I am getting avro events. I have to process those in
> hive. Using avro schema I have created hive table. But I am not able to
> load those avro events to the hive table(created by same avro schema).
>
> I am using: load data inpath '/user/test/xyz.avro' into table xyz;
>
> When I execute: select * from xyz;
> Failed with exception java.io.IOException:java.io.IOException: Not a data
> file.
>

Create table script:
CREATE TABLE xyz
  ROW FORMAT SERDE
  'com.linkedin.haivvreo.AvroSerDe'
  WITH SERDEPROPERTIES (
    'schema.url'='file:/home/test/tmp/xyz.avsc')
  STORED as INPUTFORMAT
  'com.linkedin.haivvreo.AvroContainerInputFormat'
  OUTPUTFORMAT
  'com.linkedin.haivvreo.AvroContainerOutputFormat';
> Please advice what should I do?
>
> Thanks in advance.
>
> Sourabh
>