I am running scala_script.scala
from unix cli and getting error of: enycription key missing
, while the same scala code runs fine in spark-shell.
The code is used to access a hive table load it in dataframe, process some transformation and then again: write.mode("append/overwrite").saveAsTable("my_db.my_table")
. Code is:
import org.apache.spark.sql.hive.HiveContext;
val hc = new org.apache.spark.sql.hive.HiveContext(sc)
val tb_applicant_details=hc.sql("SELECT * FROM staging_mps_25.applicant_details")
tb_applicant_details.write.mode("overwrite").insertInto("spark_tests.new_test_person")