Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB