This feature is in Public Preview.
Applies to: Databricks SQL Databricks Runtime 13.2 and above Unity Catalog only
Creates a volume with the specified name. If a volume with the same name already exists in the schema SCHEMA_NOT_FOUND is raised.
See Volumes for details about using volumes.
CREATE [ EXTERNAL ] VOLUME [ IF NOT EXISTS ] volume_name
[ LOCATION location_path ]
[ COMMENT comment ]
IF NOT EXISTS
Creates a volume with the given name if it does not exist. If a volume with the same name already exists, nothing will happen.
The name of the volume to be created. Volumes can only be created in Unity Catalog schemas.
STRINGliteral defining the path of the file system in which the specified external volume is created. If the specified path does not exist in the underlying file system, creates a directory with the path. The chosen path should not overlap with the location of any other volumes or tables.
This clause does not apply for managed volumes.
STRINGliteral description for the volume.
– Create an external volume on the specified location with comment
> CREATE EXTERNAL VOLUME my_catalog.my_schema.my_external_volume
COMMENT 'This is my example external volume on S3'
– Query the data from the file in the created volume
> SELECT *
– Create a managed volume with full schema name
> CREATE VOLUME my_catalog.my_schema.my_volume
– Create a managed volume in default catalog and schema
> CREATE VOLUME my_another_volume