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
Honored Contributor
Honored Contributor

 

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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!