Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

getting error while persisting spark output to hive

Solved Go to solution

getting error while persisting spark output to hive

Rising Star
scala> df.select("name","age").write().format("com.databricks.spark.csv").mode(SaveMode.Append).saveAsTable("PersonHiveTable");
<console>:39: error: org.apache.spark.sql.DataFrameWriter does not take parameters
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: getting error while persisting spark output to hive

@Divya Gehlot

Since this is scala and not Java, the following should work

df.select("name","age").write.format("com.databricks.spark.csv").mode(SaveMode.Append).saveAsTable("PersonHiveTable");

View solution in original post

1 REPLY 1
Highlighted

Re: getting error while persisting spark output to hive

@Divya Gehlot

Since this is scala and not Java, the following should work

df.select("name","age").write.format("com.databricks.spark.csv").mode(SaveMode.Append).saveAsTable("PersonHiveTable");

View solution in original post

Don't have an account?
Coming from Hortonworks? Activate your account here