Support Questions
Find answers, ask questions, and share your expertise

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