cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to download a file in DBFS that contains multibyte characters in the file path?

aki1
New Contributor II

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>

2 REPLIES 2

Debayan
Esteemed Contributor III
Esteemed Contributor III

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!

aki1
New Contributor II

@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?

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.