<?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 Loading sequence files to Hive table in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192499#M62071</link>
    <description>&lt;P&gt;How Can I load a sequence file to an external table.&lt;/P&gt;&lt;P&gt;Looking for a help&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2017 16:36:31 GMT</pubDate>
    <dc:creator>das_dineshk</dc:creator>
    <dc:date>2017-05-31T16:36:31Z</dc:date>
    <item>
      <title>Loading sequence files to Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192499#M62071</link>
      <description>&lt;P&gt;How Can I load a sequence file to an external table.&lt;/P&gt;&lt;P&gt;Looking for a help&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2017 16:36:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192499#M62071</guid>
      <dc:creator>das_dineshk</dc:creator>
      <dc:date>2017-05-31T16:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sequence files to Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192500#M62072</link>
      <description>&lt;P&gt;
	Hi &lt;A rel="user" href="https://community.cloudera.com/users/14978/dasdineshk.html" nodeid="14978"&gt;@Dinesh Das&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	You can do a CREATE EXTERNAL table as normal, but add the storage qualifier to it.  For example:&lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
	create external table countries_ext_seq &lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
	LIKE countries_seq &lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
	STORED AS SEQUENCEFILE &lt;/P&gt;&lt;P style="margin-left: 40px;"&gt;
	LOCATION '/tmp/seqTest'&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;In the above example, I already have an existing hive table with the same columns and datatypes, so I use the lazy method by using the LIKE clause, but you can do the same with a full definition.  I'm able to create this external table, point it to an existing sequence file stored in HDFS, and query with no problem.&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;As always, if you find this post useful, please "Accept" the answer.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 05:37:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192500#M62072</guid>
      <dc:creator>ssahi</dc:creator>
      <dc:date>2017-06-02T05:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Loading sequence files to Hive table</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192501#M62073</link>
      <description>&lt;P&gt;You need to create external table then load data either from local or from HDFS.&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE &amp;lt;table_name&amp;gt; (column1 &amp;lt;datatype&amp;gt;,column2 &amp;lt;datatype&amp;gt;,column3 &amp;lt;datatype&amp;gt;,...) ROW FORMAT DELIMITED STORED AS SEQUENCEFILE LOCATION '&amp;lt;location_path&amp;gt;';
Now Load data :

LOAD DATA INPATH '&amp;lt;HDFS PATH&amp;gt;' INTO &amp;lt;table_name&amp;gt;;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Jun 2017 15:05:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Loading-sequence-files-to-Hive-table/m-p/192501#M62073</guid>
      <dc:creator>saha_priyatam</dc:creator>
      <dc:date>2017-06-02T15:05:56Z</dc:date>
    </item>
  </channel>
</rss>

