Ask Your Question
2

How can I transfer a File stored in dbfs:/FileStore on Databricks to my local machine?

asked 2022-01-11 11:00:00 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-12-18 09:00:00 +0000

david gravatar image

To transfer a file stored in dbfs:/FileStore to your local machine, you can use the following steps:

  1. Open a notebook in Databricks and navigate to the dbfs:/FileStore directory where the file is stored.

  2. Right-click on the file and select "Export".

  3. In the Export dialog box, select "Download" as the export method and click "Export".

  4. The file will be downloaded to your local machine's default download location. You can then move it to the desired location on your local machine.

Alternatively, you can use the Databricks CLI to retrieve the file from the dbfs:/FileStore directory. To do so, follow these steps:

  1. Install the Databricks CLI on your local machine.

  2. Open a command prompt or terminal window and run the following command to authenticate with your Databricks workspace:

databricks configure --token
  1. Enter your Databricks personal access token when prompted.

  2. Once authenticated, run the following command to download the file from the dbfs:/FileStore directory:

databricks fs cp dbfs:/FileStore/path/to/file local/path/to/file
  1. The file will be downloaded to the specified local path.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-01-11 11:00:00 +0000

Seen: 10 times

Last updated: Dec 18 '21