How to change Databricks UI files upload default path from /FileStore/tables/?

Viewed 325

While trying to upload a file into Databricks DBFS, the only option it gives to upload is /FileStore/tables/

enter image description here

I need my files in /FileStore/shared_uploads/. Is there a way to change it? The documentation on Databricks official website seems to be outdated. It would be a great help if any one could give a way out.

2 Answers

This UI is specifically for uploading data for creation of tables. That's why it uses the predefined path: /FileStore/tables/. Besides this interface, there is also a DBFS File Browser that is more flexible - but it's disabled by default, and need to be enabled by administrator. After it's enabled, then you can use it:

enter image description here

Another way is to upload files directly from the notebook:

enter image description here

But if you need to upload many files regularly, then it's better to use Databricks CLI's fs command: databricks fs local-file 'dbfs:/remote/path'. Or you can upload file to the cloud storage, and either mount that location to DBFS, or just access it directly (method depends on the cloud storage type - ADLS, S3, ...)

/Filestore location is databricks DBFS root location , FileStore is a special folder within Databricks File System (DBFS) where you can save files and have them accessible to your web browser. so that You can Save output files that you want to download to your local desktop. Upload CSVs and other data files from your local desktop to process on Databricks. This is the way to you can upload files from your local . But you really want to move from /Filstore here , you can use following command to move required location .

 dbutils.fs.mv("/FileStore/tables/", "dbfs:/dbfs/tmp/")

or just a single file:

dbutils.fs.mv("/FileStore/tables/test.csv", "dbfs:/tmp/test2/test2.csv")
Related