<?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: import csv data into hive table orc format in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152396#M32646</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt;&lt;P&gt;You can load the data from csv file to a temp hive table with same structure as orc table, then insert the data into orc table as:&lt;/P&gt;&lt;P&gt;insert into table table_orc as select * from table_textfile;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sindhu&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jun 2016 20:42:35 GMT</pubDate>
    <dc:creator>ssubhas</dc:creator>
    <dc:date>2016-06-22T20:42:35Z</dc:date>
    <item>
      <title>import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152395#M32645</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to import data from a CSV file into a hive table the orc format?&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 20:39:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152395#M32645</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-22T20:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152396#M32646</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt;&lt;P&gt;You can load the data from csv file to a temp hive table with same structure as orc table, then insert the data into orc table as:&lt;/P&gt;&lt;P&gt;insert into table table_orc as select * from table_textfile;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sindhu&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 20:42:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152396#M32646</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-06-22T20:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152397#M32647</link>
      <description>&lt;P&gt;Thank you. but I would go directly from the csv file to the hive orc table format without creating the textfile data.&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 20:54:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152397#M32647</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-22T20:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152398#M32648</link>
      <description>&lt;P&gt;Hi @alain &lt;/P&gt;&lt;P&gt;
One more way:&lt;/P&gt;&lt;P&gt;3 Step Method&lt;/P&gt;&lt;P&gt;    Step 1: You can create a external table pointing to an HDFS location conforming to the schema of your csv file. You can drop the csv file(s) into the external table location. &lt;/P&gt;&lt;P&gt;  Step 2: Create a managed Hive table with ORC format.&lt;/P&gt;&lt;P&gt;  Step 3: Do Insert into Managed table select from External table. ( Once the records are copied, delete the files from the external directory)&lt;/P&gt;&lt;P&gt;This process can be automated using scripting via oozie or cron. I have used this to do mass batch ingestion.&lt;/P&gt;&lt;P&gt;More recent way of doing this is using Apache Nifi with Hive table processor, makes life much more simpler..:). If you want to read about Nifi please go to &lt;/P&gt;&lt;P&gt;&lt;A href="http://hortonworks.com/products/hdf/" target="_blank"&gt;http://hortonworks.com/products/hdf/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2016 21:53:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152398#M32648</guid>
      <dc:creator>sbomma</dc:creator>
      <dc:date>2016-06-22T21:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152399#M32649</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/6006/nanyimalain.html" nodeid="6006"&gt;@alain TSAFACK&lt;/A&gt; Ambari Hive Views provide this feature (Upload Table) where you can directly upload CSV file into an ORC Hive table.( It takes care internally the 2 step process to create ORC table)&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 15:47:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152399#M32649</guid>
      <dc:creator>dchiguruvad</dc:creator>
      <dc:date>2016-06-23T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152400#M32650</link>
      <description>&lt;P&gt;when uploading a CSV file containing "\N", I simply get the string value "N" instead of NULL in hive&lt;/P&gt;&lt;P&gt;is there someone help to solve it ?&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ogrodnek/csv-serde/issues/15" target="_blank"&gt;https://github.com/ogrodnek/csv-serde/issues/15&lt;/A&gt;&lt;/P&gt;,&lt;P&gt;when uploading a CSV file containing "\N", I simply get the string value "N" instead of NULL in hive&lt;/P&gt;&lt;P&gt;is there someone to solve it?&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/ogrodnek/csv-serde/issues/15" target="_blank"&gt;https://github.com/ogrodnek/csv-serde/issues/15&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2016 17:43:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152400#M32650</guid>
      <dc:creator>huozhanfeng</dc:creator>
      <dc:date>2016-06-23T17:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: import csv data into hive table orc format</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152401#M32651</link>
      <description>&lt;P&gt;I have wrote a hard code in class org.apache.hadoop.hive.serde2.OpenCSVSerde, but it doesn't work when I replace the old jar "/usr/hdp/current/hive-client/lib/hive-serde-1.2.1.2.3.0.0-2557.jar". what should I do to make the new jar work?&lt;/P&gt;&lt;PRE&gt;@Override
public Object deserialize(final Writable blob) throws SerDeException {
  Text rowText = (Text) blob;
  String text = rowText.toString().replace("\\N","\"\"");
  CSVReader csv = null;
  try {
    csv = newReader(new CharArrayReader(text.toCharArray()), separatorChar,
            quoteChar, escapeChar);&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Jun 2016 17:49:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/import-csv-data-into-hive-table-orc-format/m-p/152401#M32651</guid>
      <dc:creator>huozhanfeng</dc:creator>
      <dc:date>2016-06-23T17:49:15Z</dc:date>
    </item>
  </channel>
</rss>

