<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Create Hive ORC table from avro file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Create-Hive-ORC-table-from-avro-file/m-p/168859#M45593</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11314/youneskafi.html" nodeid="11314"&gt;@younes kafi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	The create table is incorrect, it is not possible to store the data in avro format into orc format. The best possible way is as below:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE avro_table
ROW FORMAT SERDE'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
LOCATION '/user/someuser/avro_folder/'
TBLPROPERTIES ('avro.schema.url'='hdfs:///user/someuser/schema.avsc');

Create orc file as below:
CREATE TABLE orc_table stored as orc;
INSERT INTO TABLE orc_table SELECT * FROM avro_table;&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 08 Nov 2016 20:52:27 GMT</pubDate>
    <dc:creator>ssubhas</dc:creator>
    <dc:date>2016-11-08T20:52:27Z</dc:date>
    <item>
      <title>Create Hive ORC table from avro file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Create-Hive-ORC-table-from-avro-file/m-p/168858#M45592</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to create an internal ORC hive table from an avro hdfs file?&lt;/P&gt;&lt;P&gt;I tried something like this: &lt;/P&gt;&lt;PRE&gt;CREATE TABLE orc_table
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
STORED as orc
LOCATION '/user/someuser/avro_folder/'
TBLPROPERTIES ('avro.schema.url'='hdfs:///user/someuser/schema.avsc');&lt;/PRE&gt;&lt;P&gt;but I get this error:&lt;/P&gt;&lt;PRE&gt;Failed with exception java.io.IOException:java.lang.RuntimeException: serious problem&lt;/PRE&gt;&lt;P&gt;Beside a describe formatted command returns:&lt;/P&gt;&lt;PRE&gt;# Storage Information
SerDe Library:          org.apache.hadoop.hive.serde2.avro.AvroSerDe
InputFormat:            org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
OutputFormat:           org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat&lt;/PRE&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 20:39:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Create-Hive-ORC-table-from-avro-file/m-p/168858#M45592</guid>
      <dc:creator>younes_kafi</dc:creator>
      <dc:date>2016-11-08T20:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create Hive ORC table from avro file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Create-Hive-ORC-table-from-avro-file/m-p/168859#M45593</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11314/youneskafi.html" nodeid="11314"&gt;@younes kafi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	The create table is incorrect, it is not possible to store the data in avro format into orc format. The best possible way is as below:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE avro_table
ROW FORMAT SERDE'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
LOCATION '/user/someuser/avro_folder/'
TBLPROPERTIES ('avro.schema.url'='hdfs:///user/someuser/schema.avsc');

Create orc file as below:
CREATE TABLE orc_table stored as orc;
INSERT INTO TABLE orc_table SELECT * FROM avro_table;&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 08 Nov 2016 20:52:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Create-Hive-ORC-table-from-avro-file/m-p/168859#M45593</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-11-08T20:52:27Z</dc:date>
    </item>
  </channel>
</rss>

