cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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
Databricks Employee
Databricks Employee

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?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group