renameFileFormat
Renames an existing file format in Snowflake.
Note: Automatic rollback renames the file format back to original name.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the file format | No |
| String | Name of the schema containing the file format | No |
| String | Current name of the file format | Yes |
| String | New name for the file format | Yes |
| Boolean | Only rename if the file format exists using | 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">
<!-- Basic rename -->
<changeSet id="rename-file-format-basic" author="examples">
<pro-snowflake:renameFileFormat
oldFileFormatName="CSV_FORMAT"
newFileFormatName="CSV_FORMAT_V2"/>
</changeSet>
<!-- Rename with IF EXISTS -->
<changeSet id="rename-file-format-if-exists" author="examples">
<pro-snowflake:renameFileFormat
oldFileFormatName="OLD_JSON_FORMAT"
newFileFormatName="JSON_FORMAT_PRODUCTION"
ifExists="true"/>
</changeSet>
<!-- Rename with schema qualification -->
<changeSet id="rename-file-format-qualified" author="examples">
<pro-snowflake:renameFileFormat
catalogName="MY_DATABASE"
schemaName="STAGING"
oldFileFormatName="TEMP_FORMAT"
newFileFormatName="PRODUCTION_FORMAT"
ifExists="true"/>
</changeSet>
</databaseChangeLog>