In the file system of Hadoop I have Excel file.
I have task to copy that file from Hadoop to remote SFTP server in my Scala/Spark application.
I have formed the opinion that directly it will not work. If my fears are correct, I need to make next steps:
1) Remove excel file from Hadoop to local directory. For example I can make it with Scala DSL:
import scala.sys.process._
s"hdfs dfs -copyToLocal /hadoop_path/file_name.xlsx /local_path/" !
2) From local directory send file to remote SFTP server. What kind of library you can recommend for this task?
Is my reasoning correct? What the best way to solve my problem?