Getting error with spark-sftp, no such file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2022 03:23 PM
In a databricks cluster with Scala 2.1.1 I am trying to read a file into a spark data frame using the following code.
val df = spark.read
.format("com.springml.spark.sftp")
.option("host", "*")
.option("username", "*")
.option("password", "*")
.option("fileType", "csv")
.option("delimiter", ";")
.option("inferSchema", "true")
.load("/my_file.csv")However, I get the following error
org.apache.spark.sql.AnalysisException: Path does not exist: dbfs:/local_disk0/tmp/my_file.csv;I think I need to load the file from a temporary locationbut, I can't find that path and a way to do so. Can anyone help with that?
- Labels:
-
SFTP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2022 08:34 AM
Hi @Andreas P , could you please run the below command and see if you can list the file?
import os
os.listdir('/dbfs/tmp')Please refer: https://docs.databricks.com/files/index.html#access-files-on-the-driver-filesystem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 04:31 AM
What distribution is that? I remember that it hasn't worked on the community edition in the past due to a lack of access to the underlying system. Also, there can be differences between single/standard clusters and high concurrency/shared ones.
My blog: https://databrickster.medium.com/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 01:32 AM
Hi @Andreas P
Hope all is well!
Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help.
We'd love to hear from you.
Thanks!