Skip to main content

VOLUMES

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 13.3 LTS and above check marked yes Unity Catalog only

INFORMATION_SCHEMA.VOLUMES contains the object level metadata for volumes within the local catalog or all catalogs if owned by the SYSTEM catalog.

The rows returned are limited to the volumes the user is privileged to interact with.

This is an extension to the SQL Standard Information Schema.

Definition

The VOLUMES relation contains the following columns:

NameData typeNullableDescription
VOLUME_CATALOGSTRINGNoCatalog that contains the volume.
VOLUME_SCHEMASTRINGNoSchema that contains the volume.
VOLUME_NAMESTRINGNoName of the volume.
VOLUME_TYPESTRINGNoOne of 'MANAGED', 'EXTERNAL'.
VOLUME_OWNERSTRINGNoUser or group (principal) currently owning the volume.
COMMENTSTRINGYesAn optional comment that describes the volume.
CREATEDTIMESTAMPNoTimestamp when the volume was created.
CREATED_BYSTRINGNoPrincipal which created the volume.
LAST_ALTEREDTIMESTAMPNoTimestamp when the volume definition was last altered in any way.
LAST_ALTERED_BYSTRINGNoPrincipal which last altered the volume.
STORAGE_LOCATIONSTRINGNoThe storage location where the volume is created.

Constraints

The following constraints apply to the VOLUMES relation:

ClassNameColumn ListDescription
Primary keyVOLUMES_PKVOLUME_CATALOG, VOLUME_SCHEMA, VOLUME_NAMEUnique identifier for the volume.
Foreign keyVOLUME_SCHEMATA_FKVOLUME_CATALOG, VOLUME_SCHEMAReferences SCHEMATA.

Examples

SQL
> SELECT table_owner
FROM information_schema.volumes
WHERE volume_schema = 'my_schema'
AND volume_name = 'my_volume';