alterStageTags
Sets or removes tags on an existing stage in Snowflake.
Note: This change type does not support automatic rollback.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the stage | No |
| String | Name of the schema containing the stage | No |
| String | Name of the stage to alter | Yes |
| Boolean | Don't error if the stage doesn't exist | No |
| 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-stage-tags" author="examples">
<pro-snowflake:alterStageTags stageName="DATA_STAGE">
<pro-snowflake:setTags>
<pro-snowflake:entry key="environment" value="production"/>
<pro-snowflake:entry key="region" value="us-east"/>
</pro-snowflake:setTags>
</pro-snowflake:alterStageTags>
</changeSet>
<!-- Set tags with IF EXISTS -->
<changeSet id="set-stage-tags-if-exists" author="examples">
<pro-snowflake:alterStageTags stageName="DATA_STAGE" ifExists="true">
<pro-snowflake:setTags>
<pro-snowflake:entry key="status" value="active"/>
</pro-snowflake:setTags>
</pro-snowflake:alterStageTags>
</changeSet>
<!-- Unset tags -->
<changeSet id="unset-stage-tags" author="examples">
<pro-snowflake:alterStageTags stageName="DATA_STAGE">
<pro-snowflake:unsetTags>
<pro-snowflake:unsetTag tagName="environment"/>
<pro-snowflake:unsetTag tagName="region"/>
</pro-snowflake:unsetTags>
</pro-snowflake:alterStageTags>
</changeSet>
</databaseChangeLog>