Skip to contents

Creates a new volume.

Usage

create_volume(
  client,
  catalog_name,
  schema_name,
  name,
  volume_type,
  comment = NULL,
  storage_location = NULL
)

volumesCreate(
  client,
  catalog_name,
  schema_name,
  name,
  volume_type,
  comment = NULL,
  storage_location = NULL
)

Arguments

client

Required. Instance of DatabricksClient()

catalog_name

Required. The name of the catalog where the schema and the volume are.

schema_name

Required. The name of the schema where the volume is.

name

Required. The name of the volume.

volume_type

Required. This field has no description yet.

comment

The comment attached to the volume.

storage_location

The storage location on the cloud.

Details

The user could create either an external volume or a managed volume. An external volume will be created in the specified external location, while a managed volume will be located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore.

For the volume creation to succeed, the user must satisfy following conditions: - The caller must be a metastore admin, or be the owner of the parent catalog and schema, or have the USE_CATALOG privilege on the parent catalog and the USE_SCHEMA privilege on the parent schema. - The caller must have CREATE VOLUME privilege on the parent schema.

For an external volume, following conditions also need to satisfy - The caller must have CREATE EXTERNAL VOLUME privilege on the external location. - There are no other tables, nor volumes existing in the specified storage location. - The specified storage location is not under the location of other tables, nor volumes, or catalogs or schemas.