question

JeffvG-0844 avatar image
0 Votes"
JeffvG-0844 asked VaibhavChaudhari edited

How do I download a file from Azure's DBFS?

I'd like to get a copy of df.csv downloaded to my local system. How would I do that?

117481-image.png


azure-databricks
image.png (40.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

VaibhavChaudhari avatar image
2 Votes"
VaibhavChaudhari answered VaibhavChaudhari edited

Modify the URL slightly, press enter and you get the file downloaded to your local.

Files stored in /FileStore are accessible in your web browser at https://<databricks-instance>/files/.

For example, the file you stored in /FileStore/my-stuff/my-file.txt is accessible at https://<databricks-instance>/files/my-stuff/my-file.txt.

However, if there is ?o= in the deployment URL, for example,
https://<databricks-instance>/?o=6280049833xxxxxx, replace
https://<databricks-instance>/files/my-stuff/my-file.txt with
https://<databricks-instance>/files/my-stuff/my-file.txt?o=###### where the number after o= is the same as in your URL.

E.g.
https://adb-xxx.x.azuredatabricks.net/files/df.csv?o=xxx

Reference:
https://docs.databricks.com/data/filestore.html#save-a-file-to-filestore
https://stackoverflow.com/questions/66685638/databricks-download-a-dbfs-filestore-file-to-my-local-machine


Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.