<?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: Multiple methods to create AVRO based Hive table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206717#M62736</link>
    <description>&lt;P&gt;They are the same.  Hive has a few shortcuts for common SerDes and Avro is one of them.  You can use one of the following, or specify your own INPUTFORMAT and OUTPUTFORMAT classes.&lt;/P&gt;&lt;PRE&gt;file_format:
  : SEQUENCEFILE
  | TEXTFILE    -- (Default, depending on hive.default.fileformat configuration)
  | RCFILE      -- (Note: Available in Hive 0.6.0 and later)
  | ORC         -- (Note: Available in Hive 0.11.0 and later)
  | PARQUET     -- (Note: Available in Hive 0.13.0 and later)
  | AVRO        -- (Note: Available in Hive 0.14.0 and later)
  | INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname
&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Jun 2017 04:26:26 GMT</pubDate>
    <dc:creator>bhopp</dc:creator>
    <dc:date>2017-06-13T04:26:26Z</dc:date>
    <item>
      <title>Multiple methods to create AVRO based Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206716#M62735</link>
      <description>&lt;P&gt;
	We can create the same table using one of the below two queries: &lt;/P&gt;&lt;P&gt;I have seen that they both result in the same table. &lt;/P&gt;&lt;P&gt;so how do they differ? and if they differ, when do I use one over the other? &lt;/P&gt;&lt;PRE&gt;CREATE TABLE sample_table
STORED AS AVRO
TBLPROPERTIES('avro.schema.url' = '&amp;lt;some location&amp;gt;');&lt;/PRE&gt;
&lt;PRE&gt;CREATE TABLE sample_table
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
WITH SERDEPROPERTIES ('avro.schema.url'='file:///tmp/schema.avsc')
STORED as INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat';
&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jun 2017 21:44:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206716#M62735</guid>
      <dc:creator>nrbndsdb0509</dc:creator>
      <dc:date>2017-06-12T21:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple methods to create AVRO based Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206717#M62736</link>
      <description>&lt;P&gt;They are the same.  Hive has a few shortcuts for common SerDes and Avro is one of them.  You can use one of the following, or specify your own INPUTFORMAT and OUTPUTFORMAT classes.&lt;/P&gt;&lt;PRE&gt;file_format:
  : SEQUENCEFILE
  | TEXTFILE    -- (Default, depending on hive.default.fileformat configuration)
  | RCFILE      -- (Note: Available in Hive 0.6.0 and later)
  | ORC         -- (Note: Available in Hive 0.11.0 and later)
  | PARQUET     -- (Note: Available in Hive 0.13.0 and later)
  | AVRO        -- (Note: Available in Hive 0.14.0 and later)
  | INPUTFORMAT input_format_classname OUTPUTFORMAT output_format_classname
&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Jun 2017 04:26:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206717#M62736</guid>
      <dc:creator>bhopp</dc:creator>
      <dc:date>2017-06-13T04:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple methods to create AVRO based Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206718#M62737</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Then if I am to use one of the common SerDes, Avro in this case, I can get by with just &lt;/P&gt;&lt;PRE&gt;CREATE TABLE sample_table
STORED AS AVRO
TBLPROPERTIES('avro.schema.url' = '&amp;lt;some location&amp;gt;');&lt;/PRE&gt;&lt;P&gt;rather than use the longer format?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 09:47:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206718#M62737</guid>
      <dc:creator>nrbndsdb0509</dc:creator>
      <dc:date>2017-06-13T09:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple methods to create AVRO based Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206719#M62738</link>
      <description>&lt;P&gt;Yep, that should work just fine.  Longer format is useful if you want to use custom SerDes such as the OpenCSV serde, but the table created using STORED AS AVRO will be identical as the one created explicitly using the org.apache.hadoop.hive.serde2.avro.AvroSerDe.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 01:40:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206719#M62738</guid>
      <dc:creator>bhopp</dc:creator>
      <dc:date>2017-06-14T01:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple methods to create AVRO based Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206720#M62739</link>
      <description>&lt;P&gt;Thank you so much for the explanations!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 09:32:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Multiple-methods-to-create-AVRO-based-Hive-table/m-p/206720#M62739</guid>
      <dc:creator>nrbndsdb0509</dc:creator>
      <dc:date>2017-06-14T09:32:42Z</dc:date>
    </item>
  </channel>
</rss>

