cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Valued Contributor II
Valued Contributor II

 

  • 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.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.