I am trying to build a Spark Job which can connect to a SFTP Server and drop a csv file there. The option that I found was to use the SpringML package. However, I keep getting a noSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Lscala/collection/mutable/ArrayOps;
. This was once described in an issue related to the package.
It is not exactly clear to me how the issue was resolved and if I am just making a user error. I use the newest version of the SpringML package (1.0.3) on Databricks and installed it through the Databricks Maven in "Create Library".
The code I use looks as follows:
// Read sample dataframe from table
val df = sqlContext.sql("SELECT * FROM default.some_test_data")
// Write sample data to a SFTP server
df.write.format("com.springml.spark.sftp").
option("host", "SFTP_HOST").
option("username", "SFTP_USER").
option("password", "password").
option("fileType", "fileType")
.save(/some_test_data.csv)
I am happy with any working example, even if it is using another open source package. Also feel free to point out what I miss?
Note: My Spark Version is 3.1.2, Scala 2.12