createVolume

createVolume is a Change Type in the Liquibase Pro Databricks extension that creates a volume. It is available in the Liquibase Pro Databricks extension 1.0.0 and later.

Uses

You can use this change to create a new Databricks volume. The volume owner (principal) is the user whose credentials are used in the Liquibase database connection URL. Volumes help you organize and control access to non-tabular data like images and raw logs.

For more information, see Databricks SQL Reference: CREATE VOLUME.

Run createVolume

To run this Change Type, follow these steps:

  1. Add the Change Type to your changeset, as shown in the examples on this page.

  2. Specify any required attributes. Use the table on this page to see which ones your database requires.

  3. Deploy your changeset by running the update command: liquibase update

Available attributes

Tip: You must specify all top-level attributes marked as required. If you specify an optional attribute, you must also specify any nested attributes that it requires.

Name

Type

Description

Requirement

volumeName

String

Name of the volume to create

Required

catalogName

String

Name of the catalog

Optional

comment

String

Text of the comment string to associate with the volume

Optional

ifNotExists

Boolean

If true, creates the object only if it does not already exist. Appends IF NOT EXISTS syntax to SQL query.

Optional

schemaName

String

Name of the schema

Optional

createVolume examples

databaseChangeLog:
  - changeSet:
      id: 2
      author: your.name
      changes:
        - createVolume:
            volumeName: test_volume
      rollback:
        - dropVolume:
            volumeName: test_volume