Forum Discussion

zxbucks's avatar
zxbucks
Regular Visitor
9 months ago
Solved

Notebook to load file from Lakehouse to SFTP failed

Hey Community, I need your help to troubleshooting below script:   Purpose:  Upload file from Lakehouse to SFTP     Failure Message: No such file or directory: 'Files/test.csv'   Script: im...
  • Ugk161610's avatar
    9 months ago

    Hi zxbucks ,

     

    You already found the right fix 👍 — the issue was just the file path. In Fabric notebooks, Files/test.csv is not a valid local path for Python libraries like paramiko. The file system that your code can see always starts at the Lakehouse mount point.

     

    That’s why Paramiko couldn’t find the file and raised “No such file or directory”.

     

    The correct way to reference a file from the Lakehouse is:

    local_csv_path = "/lakehouse/default/Files/test.csv"

     

    Once you use the full Lakehouse path, sftp.put() works as expected.

     

    Your tip about using “Copy file API path” from the Lakehouse UI is perfect — that’s the easiest way to get the right path format without guessing.

     

    So yes, your solution is 100% correct, and this is exactly how it should be done in Fabric.

    – Gopi Krishna