What you will be able to do
- List the privileges and size limit that apply to uploading files to a volume through the UI
- Upload local files to a volume from the New menu, Catalog Explorer or a notebook
- Create a Unity Catalog managed table from files already stored in a volume
- Manage uploaded files and directories in a volume from Catalog Explorer
1.Before uploading: what a volume takes and what you need
Sometimes you want a file stored in Databricks before you decide what to do with it. It might be raw data for a notebook, a PDF, or something that doesn't fit the formats or limits of the table-creating upload page. For that, the workspace UI can upload files into a Unity Catalog volume. A volume accepts files of any format, whether structured, semi-structured or unstructured. In general, a volume can hold files up to the maximum size the underlying cloud storage allows.
Uploading through the UI has its own limit: 5 GB per file. Anything bigger has to go through the Databricks SDK for Python. The workspace must have Unity Catalog enabled, and you need a privilege at each level of the namespace.
| Privilege | Granted on |
|---|---|
| WRITE VOLUME | The target volume |
| USE SCHEMA | The parent schema |
| USE CATALOG | The parent catalog |
Checkpoint 1 of 6· Match them up
Match each privilege to the object it must be granted on for a volume upload.
Tap a term, then the definition that fits it.
Writing a file needs write access on the volume itself, plus usage rights on the schema and catalog that contain it.
“WRITE VOLUME on the target volume”Source: docs.databricks.com
Sources1
2.Uploading files to a volume
You start from the same menu as the table upload but pick a different option. In the sidebar, click New, then Add or upload data, then Upload files to a volume. Under Files, click browse or drag files into the drop zone. Under Destination volume, select a volume or a directory inside one, or paste a volume path. If the target schema has no volume yet, click Create volume to make one, and you can also create a new directory inside it. If you don't want to set up a catalog, schema and volume first, you can choose My Files, a per-user volume, which is in Beta.
The same dialog has other entry points: - From Catalog Explorer: Add data > Upload files to a volume - From a notebook: File > Upload files to volume - From a volume's own page: Upload to this volume, with that volume already set as the destination
After the upload, the files appear on the volume page. Click a file name to preview it.
Checkpoint 2 of 6· Put it in order
Put the steps for uploading a local file to a volume in order.
- 1.Under Destination volume, select a volume or directory, or paste a volume path
- 2.In the sidebar, click New, then Add or upload data
- 3.Click Upload files to a volume
- 4.Under Files, browse for the file or drag it into the drop zone
The volume upload begins in the same add-data menu, then you choose the files and finally the destination.
“In the sidebar, click New, then Add or upload data.”Source: docs.databricks.com
Checkpoint 3 of 6· Check yourself
You are working in a notebook and want to upload a local file to a volume without leaving it. Where do you start?
Inside a notebook the entry point is the File menu. Add data > Upload files to a volume is the Catalog Explorer entry point, and Import on a workspace directory brings in workspace files rather than volume files.
“From a notebook: File > Upload files to volume”Source: docs.databricks.com
Checkpoint 4 of 6· Exam question
While working inside a Databricks notebook, an analyst has a small reference CSV on their laptop that they want to add to an existing Unity Catalog volume without leaving the notebook to open Catalog Explorer. Which built-in option lets them do this directly from the notebook interface?
Correct answer: A — The notebook's `File` menu offers `Upload files to volume`, which opens the same upload dialog used elsewhere and writes the selected file into the chosen volume path.
- A. The notebook's `File` menu includes an `Upload files to volume` action that opens the standard upload dialog, letting the analyst stage the local CSV into a Unity Catalog volume without switching to Catalog Explorer.
- B. There is no `Run` menu command that mounts a laptop's local file system to DBFS; DBFS mounts are configured against cloud object storage, not a local machine, and files uploaded through the UI land in Unity Catalog volumes rather than DBFS.
- C. Databricks notebooks do not support a `%upload` magic command, and uploaded files are staged into Unity Catalog volumes rather than pushed into a cluster's ephemeral driver storage.
- D. The notebook results pane has no file-path field that fetches files from a local machine over SSH; Databricks has no mechanism to reach into an analyst's laptop this way.
3.Turning uploaded volume files into a table
A file sitting in a volume is not a table yet. Catalog Explorer has a UI for creating a Unity Catalog managed table from one file, several files, or a whole directory in a volume. Select the files or directory first. They should all have the same data layout. Then click Create table to open the Create table from volumes dialog. In the dialog you:
1. Choose Create new table or Overwrite existing table 2. Select the target Catalog and Schema 3. Enter the Table name 4. Optionally override the default column names and types, or exclude columns. More settings are under Advanced attributes
Click Create table. When it finishes, Catalog Explorer shows the details of the new table.
The requirements here are stricter than for the local-file upload page. You need the CREATE TABLE privilege on the target schema, and you need access to a running SQL warehouse specifically.
Checkpoint 5 of 6· Check yourself
You have CREATE TABLE on the schema and a running all-purpose cluster, but no SQL warehouse. You try Create table on a CSV in a volume. What is missing?
Creating a table from volume files requires CREATE TABLE on the target schema and access to a running SQL warehouse.
“You must have CREATE TABLE permissions in the target schema and have access to a running SQL warehouse.”Source: docs.databricks.com
Sources1
4.Managing uploaded files in Catalog Explorer
To work with an uploaded file afterwards, click Catalog in the workspace and browse or search for the volume. The volume page lists each file's name, size and last-modified date. From there you can select files and download or delete them, and the kebab menu next to a file also offers Copy path and Create table. On the volume overview tab, Create directory adds a new directory. The kebab menu on a directory includes Download directory, which downloads it as a ZIP file.
Checkpoint 6 of 6· Check yourself
You download a whole directory from a volume in Catalog Explorer. What do you get?
The kebab menu on a directory offers Download directory, and the directory is downloaded as a ZIP file.
“The directory is downloaded as a ZIP file.”Source: docs.databricks.com
The 3 GB Parquet file exceeds the 2 GB total limit of the Create or modify a table page, so upload it to a volume, where the UI allows up to 5 GB per file, and then use Create table from the volume if you want a table. The 40 MB CSV is small enough for the Create or modify a table page, or you can upload it to a volume too.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.UI uploads to a volume are capped at 2 GB, the same as the table upload page.Why is that wrong?
The 2 GB total limit applies to the Create or modify a table page. UI uploads to a volume allow up to 5 GB per file, and larger files go through the Databricks SDK for Python.
Covered in Before uploading: what a volume takes and what you need
2.Any running cluster is enough to create a table from files in a volume.Why is that wrong?
The Create table from volumes flow needs a running SQL warehouse, plus CREATE TABLE on the target schema.
Covered in Turning uploaded volume files into a table
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Volumes support files up to the maximum size supported by the underlying cloud storage.”
↩︎ Before uploading: what a volume takes and what you need“A workspace with Unity Catalog enabled”
↩︎ Before uploading: what a volume takes and what you need“Under Destination volume, select a volume or directory, or paste a volume path.”
↩︎ Uploading files to a volume“If no volume exists in the target schema, you can create one by clicking Create volume.”
↩︎ Uploading files to a volume“From a notebook: File > Upload files to volume”
↩︎ Uploading files to a volume“Select one or more files or a directory. Files should have the same data layout.”
↩︎ Turning uploaded volume files into a table“Upon completion, Catalog Explorer displays the table details.”
↩︎ Turning uploaded volume files into a table“The directory is downloaded as a ZIP file.”
↩︎ Managing uploaded files in Catalog Explorer“To upload files larger than 5 GB, use the Databricks SDK for Python.”
↩︎ Exam trap 1“You must have CREATE TABLE permissions in the target schema and have access to a running SQL warehouse.”
↩︎ Exam trap 2“To upload files larger than 5 GB, use the Databricks SDK for Python.”
↩︎ Prediction“WRITE VOLUME on the target volume”
↩︎ Checkpoint“In the sidebar, click New, then Add or upload data.”
↩︎ Checkpoint“You must have CREATE TABLE permissions in the target schema and have access to a running SQL warehouse.”
↩︎ Checkpoint - 2.
“From the volume page, click Upload to this volume.”
↩︎ Uploading files to a volume“The volume page in Catalog Explorer shows each file's Name (including the extension), Size, and Last modified date.”
↩︎ Managing uploaded files in Catalog Explorer - 3.
“The total size of uploaded files must be under 2 gigabytes.”
↩︎ Managing uploaded files in Catalog Explorer