dropWarehouse

Drops an existing Snowflake warehouse.

Note: This change type does not support automatic rollback.

Important: When creating a warehouse before dropping it in the same changelog, remember that CREATE WAREHOUSE automatically switches the current session to use the newly created warehouse. Use useWarehouse to restore the session context for subsequent operations.

Available attributes

Attribute

Type

Description

Required

warehouseName

String

Name of the warehouse to drop

Yes

ifExists

Boolean

If true, only drops if the warehouse exists

No

<?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">
  <!-- Drop warehouse -->
  <changeSet id="drop-warehouse" author="examples">
    <pro-snowflake:dropWarehouse warehouseName="TEMP_WH"/>
  </changeSet>
  <!-- Drop with IF EXISTS -->
  <changeSet id="drop-warehouse-if-exists" author="examples">
    <pro-snowflake:dropWarehouse
            warehouseName="TEMP_WH"
            ifExists="true"/>
  </changeSet>
</databaseChangeLog>