alterDynamicTable alterTags
Adds or removes tag associations for metadata management and governance on a dynamic table.
Known limitations:
This change type does not support automatic rollback.
Snowflake snapshots created with Liquibase Secure 5.1 are incompatible with earlier versions due to enhanced object type detection for TABLES and VIEWS. Regenerate all snapshots with 5.1 after upgrading to avoid false differences in diff and diff-changelog operations.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the table | No |
| String | Name of the schema containing the table | No |
| String | Name of the dynamic table to alter | Yes |
| Boolean | Only execute if the table exists | No |
alterTags nested elements
Element | Type | Description | Required |
|---|---|---|---|
| MapWrapper | Key-value pairs of tags to set* | No |
| List<UnsetTag> | List of tag names to remove* | No |
*Exactly one of setTags or unsetTags must be specified.
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:pro-snowflake="http://www.liquibase.org/xml/ns/pro-snowflake"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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/pro-snowflake
http://www.liquibase.org/xml/ns/pro-snowflake/liquibase-pro-snowflake-latest.xsd">
<!-- Set tags -->
<changeSet id="set-tags" author="examples">
<pro-snowflake:alterDynamicTable tableName="PRODUCTION_SUMMARY">
<pro-snowflake:alterTags>
<pro-snowflake:setTags>
<pro-snowflake:entry key="environment" value="production"/>
<pro-snowflake:entry key="refresh_frequency" value="10-minutes"/>
<pro-snowflake:entry key="cost_center" value="analytics"/>
</pro-snowflake:setTags>
</pro-snowflake:alterTags>
</pro-snowflake:alterDynamicTable>
</changeSet>
<!-- Unset tags -->
<changeSet id="unset-tags" author="examples">
<pro-snowflake:alterDynamicTable tableName="OLD_SUMMARY">
<pro-snowflake:alterTags>
<pro-snowflake:unsetTags>
<pro-snowflake:unsetTag tagName="temporary"/>
<pro-snowflake:unsetTag tagName="test"/>
</pro-snowflake:unsetTags>
</pro-snowflake:alterTags>
</pro-snowflake:alterDynamicTable>
</changeSet>
</databaseChangeLog>