<?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: hive context save file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124355#M30966</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; please use saveAsHadoopFile while will write to hdfs&lt;/P&gt;&lt;P&gt;saveAsHadoopFile(&amp;lt;file-name&amp;gt;,
                          &amp;lt;file output format&amp;gt;",
                          compressionCodecClass="org.apache.hadoop.io.compress.GzipCodec")&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;hive_context.write.format("orc").save("test_orc")&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2016 14:11:46 GMT</pubDate>
    <dc:creator>rajkumar_singh</dc:creator>
    <dc:date>2016-06-07T14:11:46Z</dc:date>
    <item>
      <title>hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124354#M30965</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I work with Hive- Context to load and manipulate data in my orc format. I
would now please know how to save in the hdfs file the results of a sql queries ?&lt;/P&gt;&lt;P&gt;Help me please?&lt;/P&gt;&lt;P&gt;Here is my Hive-Context code, I would like to save the contents of hive_context in a file on my hdfs :&lt;/P&gt;&lt;P&gt;Thanks you in advance&lt;/P&gt;&lt;PRE&gt;from pyspark.sql import HiveContext from pyspark import SparkContext
sc =SparkContext()
hive_context = HiveContext(sc) qvol = hive_context.table("&amp;lt;bdd_name&amp;gt;.&amp;lt;table_name&amp;gt;") qvol.registerTempTable("qvol_temp") hive_context.sql("select * from qvol_temp limit 10").show()
&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:05:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124354#M30965</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-07T14:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124355#M30966</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; please use saveAsHadoopFile while will write to hdfs&lt;/P&gt;&lt;P&gt;saveAsHadoopFile(&amp;lt;file-name&amp;gt;,
                          &amp;lt;file output format&amp;gt;",
                          compressionCodecClass="org.apache.hadoop.io.compress.GzipCodec")&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;EM&gt;hive_context.write.format("orc").save("test_orc")&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:11:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124355#M30966</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-07T14:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124356#M30967</link>
      <description>&lt;P&gt;Thank you. But here are the errors generated by the two attributes saveAsHadoopFile and &lt;EM&gt;.write.format&lt;/EM&gt;: &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4795-untitled.png" style="width: 1258px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22720iAD9A990478C3EC41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4795-untitled.png" alt="4795-untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4796-untitled2.png" style="width: 853px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22721i9D2841BEFB0FB913/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4796-untitled2.png" alt="4796-untitled2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This means that these two attributes are not recognized by HiveContext.&lt;/P&gt;&lt;P&gt;Thank you !!!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 10:14:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124356#M30967</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2019-08-19T10:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124357#M30968</link>
      <description>&lt;P&gt;saveAsHadoopFile is applicable for RDD and is not for DF, can you try &lt;EM&gt;hive_context.write.format("orc").save("test_orc")&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:38:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124357#M30968</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-07T14:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124358#M30969</link>
      <description>&lt;P&gt;I tried with &lt;EM&gt;hive_context.write.format("orc").save("test_orc")&lt;/EM&gt; but I receive this error:
&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; hive_context.write.format("orc").save("hdfs://dev/datalake/app/des/dev/transformer/test_orc")
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
AttributeError: 'HiveContext' object has no attribute 'write'&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:49:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124358#M30969</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-07T14:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124359#M30970</link>
      <description>&lt;P&gt;could you please modify your program in this way and see if you still see any excepton&lt;/P&gt;&lt;PRE&gt;from pyspark import SparkConf, SparkContext
from pyspark.sql import HiveContext
sc = SparkContext()
sqlContext = HiveContext(sc)
sqlContext.sql("select * from default.aaa limit 3").write.format("orc").save("test_orc2")&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:37:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124359#M30970</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-06-07T18:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124360#M30971</link>
      <description>&lt;DIV&gt;Hello, thank you.&lt;/DIV&gt;&lt;DIV&gt;Here it goes.  And i also found parquet file. Currently I am also looking to save as csv file and text if possible.&lt;/DIV&gt;&lt;DIV&gt;Cordially&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Jun 2016 15:42:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124360#M30971</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-08T15:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: hive context save file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124361#M30972</link>
      <description>&lt;DIV&gt;It's good I found !!! &lt;/DIV&gt;&lt;DIV&gt;thank you&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 Jun 2016 22:25:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-context-save-file/m-p/124361#M30972</guid>
      <dc:creator>nanyim_alain</dc:creator>
      <dc:date>2016-06-09T22:25:31Z</dc:date>
    </item>
  </channel>
</rss>

