SHOW VOLUMES
Applies to: Databricks SQL Databricks Runtime 13.3 LTS and above 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
-
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.
- Except for
Returns
A result-set with two columns:
database STRING NOT NULL
: The schema of the volumevolumeName STRING NOT NULL
: The name of the volume
Examples
– 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