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:

Name

Data type

Nullable

Description

VOLUME_CATALOG

STRING

No

Catalog that contains the volume.

VOLUME_SCHEMA

STRING

No

Schema that contains the volume.

VOLUME_NAME

STRING

No

Name of the volume.

VOLUME_TYPE

STRING

No

One of 'MANAGED', 'EXTERNAL'.

VOLUME_OWNER

STRING

No

User or group (principal) currently owning the volume.

COMMENT

STRING

Yes

An optional comment that describes the volume.

CREATED

TIMESTAMP

No

Timestamp when the volume was created.

CREATED_BY

STRING

No

Principal which created the volume.

LAST_ALTERED

TIMESTAMP

No

Timestamp when the volume definition was last altered in any way.

LAST_ALTERED_BY

STRING

No

Principal which last altered the volume.

STORAGE_LOCATION

STRING

No

The storage location where the volume is created.

Constraints

The following constraints apply to the VOLUMES relation:

Class

Name

Column List

Description

Primary key

VOLUMES_PK

VOLUME_CATALOG, VOLUME_SCHEMA, VOLUME_NAME

Unique identifier for the volume.

Foreign key

VOLUME_SCHEMATA_FK

VOLUME_CATALOG, VOLUME_SCHEMA

References SCHEMATA.

Examples

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