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: 

Unable to access unity catalog volume via /Volumes in notebook

DC3
New Contributor II

I have set up a volume in unity catalog in the format catalog/schema/volume, and granted all permissions to all users on the catalog, schema and volume.

From the notebook I can see the /Volumes directory in the root of the file system but am unable to read or list files within it.

import os
import stat

stat.filemode(os.stat("/Volumes").st_mode)
# 'drwxrwxrwx
stat.filemode(os.stat("/Volumes/catalog").st_mode)
# PermissionErro: [Errno 1] Operation not permitted: '/Volumes/catalog'
2 REPLIES 2

Walter_C
Databricks Employee
Databricks Employee

 

  • Ensure that you have the necessary privileges on the catalog, schema, and volume, to access a volume, you must have the USE CATALOG privilege on the Volume’s parent catalog and the USE SCHEMA privilege on its parent schema.

  • If you're trying to create a volume, you need the CREATE VOLUME privilege on the schema where you want to create the Volume, the USE SCHEMA privilege on the schema, and the USE CATALOG privilege on the parent catalog.

  • If you're dealing with an External Volume, you must also have the CREATE EXTERNAL VOLUME privilege on an External Location where you want to create the Volume.

 

DC3
New Contributor II

Thanks for your comments. The problem turned out to be the compute resource not having unity catalog enabled.

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