Skip to main content

SHOW VOLUMES

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

Lists all the volumes accessible to the current user in the current or optionally specified schema. Additionally, the output of this statement may be filtered by an optional matching pattern.

Syntax

SHOW VOLUMES [ { FROM | IN } schema_name ] [ [ LIKE ] regex_pattern } ]

Parameters

  • schema_name

    Specifies the schema in which volumes are to be listed.

  • regex_pattern

    A STRING literal with a regular expression pattern that is used to filter the results of the statement.

    • Except for * and | character, the pattern works like a regular expression.
    • * alone matches 0 or more characters and | is used to separate multiple different regular expressions, any of which can match.
    • The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.

Returns

A result-set with two columns:

  • database STRING NOT NULL: The schema of the volume
  • volumeName STRING NOT NULL: The name of the volume

Examples

SQL
– List all volumes accessible by the caller
> SHOW VOLUMES
database volumeName
---------------- ----------
default my_external_volume
default another_volume
default foo_volume

– List all volumes under schema `machine_learning`
> SHOW VOLUMES IN machine_learning
database volumeName
---------------- ----------
machine_learning bar_volume

– List all volumes whose name starts with 'a'
> SHOW VOLUMES LIKE 'a*'
database volumeName
---------------- ----------
default another_volume