<?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: CSV Query to run from hive.default.fileformat is ORC in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125320#M47314</link>
    <description>&lt;P&gt; i am trying to load a orc table with a non orc file,but during installation time of ambari i changed hive.default.fileformat to ORC (default is TextFile)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9849-1.png"&gt;&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9850-2.png"&gt;2.png&lt;/A&gt;1.png &lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 16:20:57 GMT</pubDate>
    <dc:creator>satya2yuva</dc:creator>
    <dc:date>2016-11-29T16:20:57Z</dc:date>
    <item>
      <title>CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125312#M47306</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;i would like to run the query LOAD DATA INPATH '/user/maria_dev/drivers.csv' OVERWRITE INTO TABLE temp_drivers;&lt;/P&gt;&lt;P&gt;But my hive default fileformat is ORC, Data is in .csv format.&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9805-help.png" target="_blank"&gt;help.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:49:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125312#M47306</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2022-09-16T10:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125313#M47307</link>
      <description>&lt;P&gt;you can change your default file format by setting set hive.default.fileformat=TextFile;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:44:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125313#M47307</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-11-28T17:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125314#M47308</link>
      <description>&lt;P&gt;how to change, initially i configured  default as ORC .&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:46:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125314#M47308</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2016-11-28T17:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125315#M47309</link>
      <description>&lt;P&gt;at session level just run this command set hive.default.fileformat=TextFile; and then run your query&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:47:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125315#M47309</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-11-28T17:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125316#M47310</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;You can either use HDF/Nifi and directly read the CSV file, transform it to the needed format and upload it to HDFS or do the following using standard HDP tools:&lt;/P&gt;&lt;P&gt;1. Move your CSV file to HDFS &lt;/P&gt;&lt;PRE&gt;-copyFromLocal drivers.csv /user/maria_dev/drivers.csv&lt;/PRE&gt;&lt;P&gt;2.Create an external table to manage the csv content in HIVE&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE IF NOT EXISTS drivers(
        ...
	)
    ROW FORMAT DELIMITED
    FIELDS TERMINATED BY ','
    STORED AS TEXTFILE
    location '/user/maria_dev/drivers.csv;
&lt;/PRE&gt;&lt;P&gt;3. Create an ORC table to be able to insert your Hive managed table:&lt;/P&gt;&lt;PRE&gt;CREATE TABLE IF NOT EXISTS mydrivers(
        ...	)
    ROW FORMAT DELIMITED
    FIELDS TERMINATED BY ','
    STORED AS ORC;&lt;/PRE&gt;&lt;P&gt;4. Now, use an SQL statement to move the data from the external table that you created in Step 2 to the Hive-managed ORC table that you created in Step 3:&lt;/P&gt;&lt;PRE&gt;INSERT OVERWRITE TABLE mydrivers SELECT * FROM drivers;&lt;/PRE&gt;&lt;P&gt;5.Verify that you imported the data into the ORC-formatted table correctly:&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; select * from mydrivers limit 3;&lt;/PRE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Also there is a detailed documentation about  this topic at: &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_data-access/content/moving_data_from_hdfs_to_hive_external_table_method.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_data-access/content/moving_data_from_hdfs_to_hive_external_table_method.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;HTH.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2016 17:47:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125316#M47310</guid>
      <dc:creator>pgreiff</dc:creator>
      <dc:date>2016-11-28T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125317#M47311</link>
      <description>&lt;P&gt;Thanks, but when i run the query the below error i am getting.&lt;/P&gt;&lt;P&gt;org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 30019]: The file that you are trying to load does not match the file format of the destination table. Destination table is stored as ORC but the file being loaded is not a valid ORC file.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 03:13:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125317#M47311</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2016-11-29T03:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125318#M47312</link>
      <description>&lt;P&gt;Thanks, could you please share your email address. my issue is&lt;/P&gt;&lt;P&gt;&lt;A href="http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/"&gt;http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-hive/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I am practicing from above link, but my hive.default.fileformat is ORC&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9825-1.png"&gt;1.png&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9826-2.png"&gt;2.png&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 04:06:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125318#M47312</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2016-11-29T04:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125319#M47313</link>
      <description>&lt;P&gt;Satya, when you created the table temp_drivers, what storage format did you use?&lt;/P&gt;&lt;P&gt;In the tutorial that you linked, the create table statement was:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;create table temp_drivers (col_value STRING);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you you changed it to &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;create table temp_drivers (col_value STRING) stored as ORC;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you might consider deleting the table and creating it new.&lt;/P&gt;&lt;P&gt;If you did not define the 'stored as ORC' storage part in the statement then you might want to check your parameters in Hive:  The default format is plain text files. TEXTFILE is the default file format, unless the configuration parameter &lt;A href="https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.default.fileformat"&gt;hive.default.fileformat&lt;/A&gt; has a different setting.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:09:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125319#M47313</guid>
      <dc:creator>pgreiff</dc:creator>
      <dc:date>2016-11-29T16:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125320#M47314</link>
      <description>&lt;P&gt; i am trying to load a orc table with a non orc file,but during installation time of ambari i changed hive.default.fileformat to ORC (default is TextFile)&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9849-1.png"&gt;&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/9850-2.png"&gt;2.png&lt;/A&gt;1.png &lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:20:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125320#M47314</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2016-11-29T16:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125321#M47315</link>
      <description>&lt;P&gt;Great. Then please drop table and create it again using the STORED AS TEXTFILE parameter or use my above described procedure to import the data using a temp table inbetween if you really need it as ORC stored data.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:37:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125321#M47315</guid>
      <dc:creator>pgreiff</dc:creator>
      <dc:date>2016-11-29T16:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: CSV Query to run from hive.default.fileformat is ORC</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125322#M47316</link>
      <description>&lt;P&gt;Thank you very much, its working fine now.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 03:46:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/CSV-Query-to-run-from-hive-default-fileformat-is-ORC/m-p/125322#M47316</guid>
      <dc:creator>satya2yuva</dc:creator>
      <dc:date>2016-11-30T03:46:35Z</dc:date>
    </item>
  </channel>
</rss>

