Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

@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

@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");
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.