How to download a file in DBFS that contains multibyte characters in the file path?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 09:11 PM
I would like to download a file in DBFS using the FileStore Endpoint.
If the file or folder name contains multibyte characters, the file path cannot be specified due to URL encoding and an error occurs.
Question 1: If a file or folder name contains multibyte characters, is it not possible to download the file using the FileStore Endpoint?
Question 2: Is there any other way to download files stored in DBFS to the local machine other than FileStore Endpoint?
Example:
Store a file in the following path.
/dbfs/FileStore/<file_path>
When the FileStore Endpoint is enabled, the file can be downloaded by accessing the following URL.
https://<workspace_name>/files/<file_path>
If the file or folder name contains multibyte characters, an error will occur.
HTTP ERROR: 404
Problem accessing /files/<encoded_file_path> Reason:
Bad Target: Get <encoded_file_path>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2023 10:27 PM
Hi,
Databricks CLI can be used to download a file from DBFS. https://docs.databricks.com/dev-tools/cli/index.html
Also, you can refer to https://stackoverflow.com/questions/49019706/databricks-download-a-dbfs-filestore-file-to-my-local-m... , which may be helpful.
Please let us know if this helps.
Also please tag @Debayan with your next response which will notify me, Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 03:29 AM
@Debayan Mukherjee
Thanks for your reply.
I was able to copy the files to my local machine using Databricks CLI.
Is there any other way than using Databricks CLI if the file contains multibyte characters?

