springml / spark-sftp

Spark connector for SFTP
Apache License 2.0
100 stars 98 forks source link

temp location hdfs #13

Closed mittalakhilesh closed 7 years ago

mittalakhilesh commented 7 years ago

Hi , How can we provide temp location to be hdfs?

springml commented 7 years ago

@mittalakhilesh We've added new option hdfsTempLocation to specify temp location in hdfs. You can use it in addition to local temp location. Like,

df.write.
      format("com.springml.spark.sftp").
      option("host", "sftp_host").
      option("username", "username
      option("password", "password").
      option("fileType", "csv").
      option("delimiter", ";").
      option("hdfsTempLocation", "/tmp/sftp").
      option("tempLocation", "/tmp").            
      save("/target_location/target.csv")

Please note that this is not yet pushed to maven repository. If needed, build from source code and include it in spark using --jars option

mittalakhilesh commented 7 years ago

Thanks...