Alter Standard Table - Contacts

Adds or removes contact associations for data governance.

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

catalogName

String

Name of the catalog (database) containing the table

No

schemaName

String

Name of the schema containing the table

No

tableName

String

Name of the table to alter

Yes

ifExists

Boolean

Only execute if the table exists

No

alterContacts nested elements

Element

Type

Description

Required

setContacts

MapWrapper

Key-value pairs of contacts to set*

No

unsetContacts

List<UnsetContact>

List of contacts to remove*

No

*Exactly one of setContacts or unsetContacts must be specified.

Valid contact keys: steward, support, approver (case-insensitive)

<?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">
  <!-- Add contacts -->
  <changeSet id="add-contacts" author="examples">
    <pro-snowflake:alterStandardTable tableName="SENSITIVE_DATA">
      <pro-snowflake:alterContacts>
        <pro-snowflake:setContacts>
          <pro-snowflake:entry key="steward" value="data.steward@company.com"/>
          <pro-snowflake:entry key="support" value="support.team@company.com"/>
        </pro-snowflake:setContacts>
      </pro-snowflake:alterContacts>
    </pro-snowflake:alterStandardTable>
  </changeSet>
  <!-- Remove contacts -->
  <changeSet id="remove-contacts" author="examples">
    <pro-snowflake:alterStandardTable tableName="PUBLIC_DATA">
      <pro-snowflake:alterContacts>
        <pro-snowflake:unsetContacts>
          <pro-snowflake:unsetContact purpose="steward"/>
          <pro-snowflake:unsetContact purpose="support"/>
        </pro-snowflake:unsetContacts>
      </pro-snowflake:alterContacts>
    </pro-snowflake:alterStandardTable>
  </changeSet>
</databaseChangeLog>