alterStageFileFormat
Modifies the file format configuration of an existing stage in Snowflake.
Note: This change type does not support automatic rollback.
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the stage | No |
| String | Name of the schema containing the stage | No |
| String | Name of the stage to alter | Yes |
| Boolean | Don't error if the stage doesn't exist | No |
| Nested | New file format configuration | Yes |
fileFormat attributes
New file format configuration (nested element):
Attribute | Type | Description |
|---|---|---|
| String | Reference to named file format |
| String | Type: |
| MapWrapper | Type-specific options (e.g., |
<?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">
<!-- Change file format type options -->
<changeSet id="alter-stage-file-format" author="examples">
<pro-snowflake:alterStageFileFormat stageName="DATA_STAGE">
<pro-snowflake:fileFormat fileFormatType="CSV">
<pro-snowflake:formatTypeOptions>
<pro-snowflake:entry key="SKIP_HEADER" value="1"/>
<pro-snowflake:entry key="COMPRESSION" value="AUTO"/>
</pro-snowflake:formatTypeOptions>
</pro-snowflake:fileFormat>
</pro-snowflake:alterStageFileFormat>
</changeSet>
<!-- Change to a named file format -->
<changeSet id="alter-stage-named-format" author="examples">
<pro-snowflake:alterStageFileFormat stageName="DATA_STAGE" ifExists="true">
<pro-snowflake:fileFormat fileFormatName="MY_CSV_FORMAT"/>
</pro-snowflake:alterStageFileFormat>
</changeSet>
<!-- Change to JSON format -->
<changeSet id="alter-stage-json-format" author="examples">
<pro-snowflake:alterStageFileFormat stageName="DATA_STAGE">
<pro-snowflake:fileFormat fileFormatType="JSON">
<pro-snowflake:formatTypeOptions>
<pro-snowflake:entry key="STRIP_OUTER_ARRAY" value="TRUE"/>
</pro-snowflake:formatTypeOptions>
</pro-snowflake:fileFormat>
</pro-snowflake:alterStageFileFormat>
</changeSet>
</databaseChangeLog>