alterMaterializedViewContacts
Sets or unsets contacts on a materialized view in Snowflake. Contacts provide a way to associate responsible parties with database objects for governance and support purposes. Materialized views require Snowflake Enterprise Edition or higher.
Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands). Contacts must be created before they can be assigned to objects.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the materialized view | No |
| String | Name of the schema containing the materialized view | No |
| String | Name of the materialized view to alter | Yes |
| Nested | Key-value pairs mapping contact purposes to contact names* | No |
| Nested | List of contact purposes to remove* | No |
*Exactly one of setContacts or unsetContacts must be specified.
setContacts attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Contact purpose: | Yes |
| String | Contact name (must reference an existing contact object) | Yes |
unsetContacts attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Contact purpose to unset: | Yes |
<?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 single contact -->
<changeSet id="mv-set-single-contact" author="examples">
<pro-snowflake:alterMaterializedViewContacts viewName="MV_CUSTOMERS">
<pro-snowflake:setContacts>
<pro-snowflake:entry key="steward" value="data_steward"/>
</pro-snowflake:setContacts>
</pro-snowflake:alterMaterializedViewContacts>
</changeSet>
<!-- Set multiple contacts -->
<changeSet id="mv-set-multiple-contacts" author="examples">
<pro-snowflake:alterMaterializedViewContacts
schemaName="PUBLIC"
viewName="MV_CUSTOMERS">
<pro-snowflake:setContacts>
<pro-snowflake:entry key="steward" value="data_steward"/>
<pro-snowflake:entry key="support" value="support_team"/>
<pro-snowflake:entry key="approver" value="compliance_officer"/>
</pro-snowflake:setContacts>
</pro-snowflake:alterMaterializedViewContacts>
</changeSet>
<!-- Unset single contact -->
<changeSet id="mv-unset-single-contact" author="examples">
<pro-snowflake:alterMaterializedViewContacts viewName="MV_CUSTOMERS">
<pro-snowflake:unsetContacts>
<pro-snowflake:unsetContact purpose="steward"/>
</pro-snowflake:unsetContacts>
</pro-snowflake:alterMaterializedViewContacts>
</changeSet>
<!-- Unset multiple contacts -->
<changeSet id="mv-unset-multiple-contacts" author="examples">
<pro-snowflake:alterMaterializedViewContacts viewName="MV_CUSTOMERS">
<pro-snowflake:unsetContacts>
<pro-snowflake:unsetContact purpose="steward"/>
<pro-snowflake:unsetContact purpose="support"/>
<pro-snowflake:unsetContact purpose="approver"/>
</pro-snowflake:unsetContacts>
</pro-snowflake:alterMaterializedViewContacts>
</changeSet>
</databaseChangeLog>