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:
- Add the Change Type to your changeset, as shown in the examples on this page.
- Specify any required attributes. Use the table on this page to see which ones your database requires.
- 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 |
Optional |
schemaName
|
String |
Name of the schema |
Optional |
Examples
databaseChangeLog:
- changeSet:
id: 2
author: your.name
changes:
- createVolume:
volumeName: test_volume
rollback:
- dropVolume:
volumeName: test_volume
{
"databaseChangeLog": [
{
"changeSet": {
"id": "2",
"author": "your.name",
"changes": [
{
"createVolume": {
"volumeName": "test_volume"
}
}
],
"rollback": [
{
"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:createVolume volumeName="test_volume"/>
<rollback>
<databricks-pro:dropVolume volumeName="test_volume"/>
</rollback>
</changeSet>
</databaseChangeLog>
Database support
This Change Type is only supported for Databricks. It does not support auto rollback.