“INSERT INTO …” with SparkSQL HiveContext
Here the similar problem is seen in version Spark 1.5.1, And tried by different versions.
The following given
sqlContext.sql("create table my_table(id int, score int)")
The only versions that worked is:
sqlContext.sql("insert into table my_table select t.* from (select 1, 10) t") sqlContext.sql("insert into my_table select t.* from (select 2, 20) t")