dropRowAccessPolicyOnTable

Removes a row access policy from a table in Snowflake. After removing the policy from all tables and views, the policy itself can be dropped.

Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).

Available attributes

Attribute

Type

Description

Required

tableCatalogName

String

Name of the catalog (database) containing the table

No

tableSchemaName

String

Name of the schema containing the table

No

tableName

String

Name of the table to remove the policy from

Yes

policyCatalogName

String

Name of the catalog containing the policy

No

policySchemaName

String

Name of the schema containing the policy

No

policyName

String

Name of the row access policy 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">
  <!-- Basic drop policy from table -->
  <changeSet id="drop-policy-from-table" author="examples">
    <pro-snowflake:dropRowAccessPolicyOnTable
                tableName="EMPLOYEES"
                policyName="TENANT_ISOLATION_POLICY"/>
  </changeSet>
  <!-- Drop cross-schema policy from table -->
  <changeSet id="drop-policy-cross-schema" author="examples">
    <pro-snowflake:dropRowAccessPolicyOnTable
                tableName="FINANCIAL_RECORDS"
                policySchemaName="SECURITY"
                policyName="FINANCE_ACCESS_POLICY"/>
  </changeSet>
</databaseChangeLog>