Jaa


DESCRIBE VOLUME

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

Returns the metadata of an existing volume. The metadata information includes volume name, schema, catalog, type, comment, and owner. If the optional EXTENDED option is specified, it returns the basic metadata information along with the other catalog properties.

Syntax

DESCRIBE VOLUME volume_name

Parameters

  • volume_name: The name of an existing volume in the Unity Catalog. If the name does not exist, an exception is thrown.

Returns

A single row result set with the following columns:

  • name STRING NOT NULL: The name of the volume; it identifies the volume object.
  • catalog STRING NOT NULL: The name of the catalog containing the volume.
  • database STRING NOT NULL: The name of the schema containing the volume.
  • owner STRING NOT NULL: The principal owning the volume.
  • storageLocation STRING: The path of the external location where the external volume resides. NULL for managed volumes.
  • volumeType STRING NOT NULL: The type of the volume, possible values: EXTERNAL, MANAGED.
  • comment STRING: A comment attached to the volume.

Examples

- Describe an external volume
> DESCRIBE VOLUME my_external_volume
  name               catalog         database       owner storageLocation                    volumeType comment
  ------------------ --------------- -------------- ----- ---------------------------------- ---------- ---------------
  my_external_volume default_catalog default_schema Alice s3://my-bucket/my-location/my-path EXTERNAL   My first volume

- Describe a managed volume
> DESCRIBE VOLUME managed_volume
  name           catalog         database       owner storageLocation                      volumeType comment
  -------------- --------------- -------------- ----- ------------------------------------ ---------- -----------------------
  managed_volume default_catalog default_schema Alice s3://<metastore-root>/volumes/<uuid> MANAGED    My first managed volume