dropVolume

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

Uses

You can use this change to drop an existing Databricks volume from your database.

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

Run dropVolume

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:
  4. 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 drop Required
catalogName String

Name of the catalog

Optional
ifExists Boolean

If true, drops the object only if it already exists. Appends IF EXISTS syntax to SQL query.

Optional
schemaName String

Name of the schema

Optional

Examples

databaseChangeLog:
  - changeSet:
      id: 2
      author: your.name
      changes:
        - dropVolume:
            volumeName: test_drop_volume
{
  "databaseChangeLog": [
    {
      "changeSet": {
        "id": "2",
        "author": "your.name",
        "changes": [
          {
            "dropVolume": {
              "volumeName": "test_volume"
            }
          }
        ]
      }
    }
  ]
}
<databaseChangeLog
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:databricks="http://www.liquibase.org/xml/ns/databricks"
    xmlns:pro="http://www.liquibase.org/xml/ns/pro"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
        http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
        http://www.liquibase.org/xml/ns/databricks
        http://www.liquibase.org/xml/ns/databricks/liquibase-databricks-latest.xsd
        http://www.liquibase.org/xml/ns/pro
        http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd">

    <changeSet id="2" author="your.name">
        <databricks-pro:dropVolume volumeName="test_volume"/>
    </changeSet>

</databaseChangeLog>

Database support

This Change Type is only supported for Databricks. It does not support auto rollback.

Related links