<?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: issue while inserting data into hive through spark in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169181#M57724</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10323/prsingh.html" nodeid="10323"&gt;@prsingh&lt;/A&gt;, Spark currently doesn't support "insert into feature", you may create dataframe and append to the table. &lt;/P&gt;&lt;PRE&gt;scala&amp;gt; var data = sqlContext.createDataFrame(Seq(("ZZ", "m:x", 34.0))).toDF("pv", "metric", "value") 
scala&amp;gt; data.show() 
scala&amp;gt; data.write.mode("append").saveAsTable("results_test_hive") 
scala&amp;gt; println(sqlContext.sql("select * from results_test_hive").count())&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Mar 2017 13:23:37 GMT</pubDate>
    <dc:creator>nyadav</dc:creator>
    <dc:date>2017-03-22T13:23:37Z</dc:date>
    <item>
      <title>issue while inserting data into hive through spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169180#M57723</link>
      <description>&lt;P&gt;Not able to insert data into hive table through spark&lt;/P&gt;&lt;P&gt;scala&amp;gt; sqlContext.sql("insert into table results_test_hive values('XXXXXXXXXX', 'm:X', 0.0)") &lt;/P&gt;&lt;P&gt;Failed with below error, &lt;/P&gt;&lt;P&gt;org.apache.spark.sql.AnalysisException: &lt;/P&gt;&lt;P&gt;Unsupported language features in query: insert into table results_test_hive values('XXXXXXXXXX', 'm:X', 0.0)&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:21:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169180#M57723</guid>
      <dc:creator>prsingh1</dc:creator>
      <dc:date>2017-03-22T13:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: issue while inserting data into hive through spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169181#M57724</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/10323/prsingh.html" nodeid="10323"&gt;@prsingh&lt;/A&gt;, Spark currently doesn't support "insert into feature", you may create dataframe and append to the table. &lt;/P&gt;&lt;PRE&gt;scala&amp;gt; var data = sqlContext.createDataFrame(Seq(("ZZ", "m:x", 34.0))).toDF("pv", "metric", "value") 
scala&amp;gt; data.show() 
scala&amp;gt; data.write.mode("append").saveAsTable("results_test_hive") 
scala&amp;gt; println(sqlContext.sql("select * from results_test_hive").count())&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 13:23:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169181#M57724</guid>
      <dc:creator>nyadav</dc:creator>
      <dc:date>2017-03-22T13:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: issue while inserting data into hive through spark</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169182#M57725</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/7520/nyadav.html" nodeid="7520"&gt;@nyadav&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information . I was able to insert after creating the dataframe. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 19:17:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/issue-while-inserting-data-into-hive-through-spark/m-p/169182#M57725</guid>
      <dc:creator>prsingh1</dc:creator>
      <dc:date>2017-03-22T19:17:28Z</dc:date>
    </item>
  </channel>
</rss>

