alterSchemaContacts
Sets or unsets contacts on a Snowflake schema.
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 database containing the schema | No |
| String | Name of the schema to alter | Yes |
| Boolean | Don't error if schema doesn't exist | No |
| Map | Contact purpose to contact name mappings* | No |
| List | List of contact purposes to remove* | No |
* Exactly one of setContacts or unsetContacts must be specified.
Contact purposes
Purpose | SQL Equivalent | Description |
|---|---|---|
|
| Data steward responsible for the schema |
|
| Support contact for operational issues |
|
| Contact for access approval requests |
unsetContact attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Contact purpose to remove | 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 contacts -->
<changeSet id="set-schema-contacts" author="examples">
<pro-snowflake:alterSchemaContacts targetSchemaName="ANALYTICS">
<pro-snowflake:setContacts>
<pro-snowflake:entry key="Steward" value="PUBLIC.data_steward"/>
<pro-snowflake:entry key="Support" value="PUBLIC.support_team"/>
</pro-snowflake:setContacts>
</pro-snowflake:alterSchemaContacts>
</changeSet>
<!-- Set contacts with IF EXISTS -->
<changeSet id="set-contacts-if-exists" author="examples">
<pro-snowflake:alterSchemaContacts
targetSchemaName="STAGING"
ifExists="true">
<pro-snowflake:setContacts>
<pro-snowflake:entry key="Approver" value="PUBLIC.approver_contact"/>
</pro-snowflake:setContacts>
</pro-snowflake:alterSchemaContacts>
</changeSet>
<!-- Unset contacts -->
<changeSet id="unset-schema-contacts" author="examples">
<pro-snowflake:alterSchemaContacts targetSchemaName="ANALYTICS">
<pro-snowflake:unsetContacts>
<pro-snowflake:unsetContact purpose="Steward"/>
<pro-snowflake:unsetContact purpose="Support"/>
</pro-snowflake:unsetContacts>
</pro-snowflake:alterSchemaContacts>
</changeSet>
</databaseChangeLog>