createFileFormat

Last updated: September 2, 2025

The createFileFormat Change type creates a FILE FORMAT object in Snowflake. FILE FORMAT objects define how to parse and interpret files stored in stages when loading data into tables or unloading data from tables.

Run createFileFormat

To run this Change type, follow these steps:

  1. Add the Change type to your changeset, as shown in the examples on this page.

  2. Specify any required attributes. Use the table on this page to see which ones your database requires.

  3. Deploy your changeset by running the command:liquibase update

Available attributes

Name

Type

Description

Requirement

fileFormatName

String

Name of the file format to create

Required

temporary

Boolean

If true, create a temporary file format

Optional

replaceIfExists

Boolean

If true, replace the file format if it already exists

Optional

ifNotExists

Boolean

If true, do not create the file format if it already exists

Optional

fileFormatType

String

Type of format. Valid values: CSV, JSON, AVRO, ORC, PARQUET, XML

Required

formatTypeOptions

Array

Format-specific options that control how files are parsed

Optional

comment

String

Comment for the file format

Optional

Nested tags

formatTypeOptions

Name

Type

Description

Requirement

entry

String

Format-specific options that control how files are parsed. Each entry contains a key-value pair. See the Snowflake FILE FORMAT documentation for a complete list of available options by format type. This page includes a full list of options available for CSV, JSON, XML, and other formats.

Optional

databaseChangeLog:
  - changeSet:
      id: 1
      author: your.name
      comment: create_file_format_comment
      changes:
        - createFileFormat:
            fileFormatName: analytics_json_format
            temporary: false
            replaceIfExists: false
            ifNotExists: true
            comment: JSON format for analytics data
            fileFormatType: JSON
            formatTypeOptions:
              - entry:
                  key: STRIP_OUTER_ARRAY
                  value: 'true'
              - entry:
                  key: DATE_FORMAT
                  value: YYYY-MM-DD

createFileFormat - Liquibase