alterViewProperties
alterViewProperties
is a Change Type in the Liquibase Open Source Databricks extension that alters the properties of a view.
Uses
You can use this Change Type to modify the properties of an existing view. For example, if you created a new view using the createView
Change Type, you can use alterViewProperties
to alter the value of tblProperties
you originally set.
Run alterViewProperties
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 |
| String | Name of the view to alter view properties on. | Required |
setExtendedTableProperties (optional)
Specifies additional properties. You can use this to specify new properties or replace existing ones. setExtendedTableProperties
has the following nested attributes: tblProperties
(string) (required): The table properties you want to specify. Specify properties using the format 'key'='value'
. Separate multiple properties using commas.
unsetExtendedTableProperties (optional)
Removes additional properties that have previously been specified. unsetExtendedTableProperties
has the following nested attributes: tblProperties
(string) (required): The table properties you want to specify. Specify properties using the format 'key'
. Separate multiple keys using commas.
alterViewProperties examples
databaseChangeLog:
- changeSet:
id: 2
author: your.name
changes:
- alterViewProperties:
viewName: test_alter_view_properties
setExtendedTableProperties:
tblProperties: '''external.location''=''s3://mybucket/mytable'',''this.is.my.key''=12,''this.is.my.key2''=true'
rollback:
- alterViewProperties:
viewName: test_alter_view_properties
unsetExtendedTablePropeties:
tblProperties: '''external.location'', ''this.is.my.key'',''this.is.my.key2'''