<?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: I am trying to insert into HIVE table through spark-sql and it  fails.. Any help ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/I-am-trying-to-insert-into-HIVE-table-through-spark-sql-and/m-p/229513#M191366</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/17949/rakanchi.html" nodeid="17949"&gt;@rakanchi&lt;/A&gt;&lt;P&gt;Spark currently doesn't support "insert into feature", you need to create dataframe and append to the table.&lt;/P&gt;&lt;PRE&gt;var data = sqlContext.createDataFrame(Seq(("ZZ", "m:x", 34.0))).toDF("pv", "metric", "value") 
data.show() 
data.write.mode("append").saveAsTable("results_test_hive") 
println(sqlContext.sql("select * from results_test_hive").count())&lt;/PRE&gt;</description>
    <pubDate>Fri, 30 Jun 2017 19:36:35 GMT</pubDate>
    <dc:creator>nyadav</dc:creator>
    <dc:date>2017-06-30T19:36:35Z</dc:date>
    <item>
      <title>I am trying to insert into HIVE table through spark-sql and it  fails.. Any help ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-am-trying-to-insert-into-HIVE-table-through-spark-sql-and/m-p/229512#M191365</link>
      <description>&lt;P&gt;Below is the query I am  using. &lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;scala&amp;gt; sqlContext.sql("insert into table results_test_hive values('XXXXXXXXXX', 'm:X', 0.0)")&lt;/PRE&gt;Failed with below error, 
org.apache.spark.sql.AnalysisException: 
Unsupported language features in query: insert into table results_test_hive values('XXXXXXXXXX', 'm:X', 0.0)  &lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Jun 2017 18:58:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-am-trying-to-insert-into-HIVE-table-through-spark-sql-and/m-p/229512#M191365</guid>
      <dc:creator>rakanchi</dc:creator>
      <dc:date>2017-06-30T18:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to insert into HIVE table through spark-sql and it  fails.. Any help ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/I-am-trying-to-insert-into-HIVE-table-through-spark-sql-and/m-p/229513#M191366</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/17949/rakanchi.html" nodeid="17949"&gt;@rakanchi&lt;/A&gt;&lt;P&gt;Spark currently doesn't support "insert into feature", you need to create dataframe and append to the table.&lt;/P&gt;&lt;PRE&gt;var data = sqlContext.createDataFrame(Seq(("ZZ", "m:x", 34.0))).toDF("pv", "metric", "value") 
data.show() 
data.write.mode("append").saveAsTable("results_test_hive") 
println(sqlContext.sql("select * from results_test_hive").count())&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Jun 2017 19:36:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/I-am-trying-to-insert-into-HIVE-table-through-spark-sql-and/m-p/229513#M191366</guid>
      <dc:creator>nyadav</dc:creator>
      <dc:date>2017-06-30T19:36:35Z</dc:date>
    </item>
  </channel>
</rss>

