I\'m trying to run an insert statement with my HiveContext, like this:
hiveContext.sql(\'insert into my_table (id, score) values (1, 10)\')
Th
The accepted answer saveAsTable fails for me with an AnalysisException (I don't understand why). What works for me instead is:
saveAsTable
AnalysisException
data = hc.sql("select 1 as id, 10 as score") data.write.mode("append").insertInto("my_table")
I'm using Spark v2.1.0.