Support Questions

Find answers, ask questions, and share your expertise

getting error while persisting spark output to hive

avatar
Expert Contributor
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

avatar

@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

avatar

@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");