alterFileFormat
Modifies properties of an existing file format in Snowflake, including comment and format-specific options.
Note: This change type does not support automatic rollback.
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 | Name of the file format to alter | Yes |
| Boolean | Only alter if the file format exists using | No |
| String | New comment text to set* | No |
| Boolean | Remove the existing comment* | No |
* newComment and unsetComment are mutually exclusive
formatTypeOptions attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Format-specific option name (e.g., | Yes |
| String | Option value | 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">
<!-- Alter file format options and comment -->
<changeSet id="alter-file-format-options" author="examples">
<pro-snowflake:alterFileFormat
fileFormatName="CSV_FORMAT"
ifExists="true"
newComment="Updated CSV format with new compression">
<pro-snowflake:formatTypeOptions>
<pro-snowflake:entry key="COMPRESSION" value="DEFLATE"/>
<pro-snowflake:entry key="SKIP_HEADER" value="2"/>
</pro-snowflake:formatTypeOptions>
</pro-snowflake:alterFileFormat>
</changeSet>
<!-- Alter file format to change only comment -->
<changeSet id="alter-file-format-comment" author="examples">
<pro-snowflake:alterFileFormat
fileFormatName="JSON_FORMAT"
newComment="Production JSON format"/>
</changeSet>
<!-- Unset comment from file format -->
<changeSet id="alter-file-format-unset-comment" author="examples">
<pro-snowflake:alterFileFormat
fileFormatName="PARQUET_FORMAT"
unsetComment="true"/>
</changeSet>
</databaseChangeLog>