> For the complete documentation index, see [llms.txt](https://docs.snowddl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snowddl.com/basic/yaml-configs/file-format.md).

# FILE FORMAT

Config path: `/<database>/<schema>/file_format/<name>.yaml`

Example:

```yaml
type: CSV
format_options:
  compression: GZIP
  record_delimiter: "\n"
  field_delimiter: ","
  skip_header: 1
  trim_space: true
```

## Schema

* <mark style="background-color:red;">**type**</mark> (str) - file format type (CSV, AVRO, PARQUET, etc.)
* **format\_options** (dict)
  * *{key}* (ident) - format option name
  * *{value}* (bool, float, int, list, str) - format option value
* **comment** (str)

## Usage notes

1. Data type of ***{value}*** is important! Correct data type for each parameter can be obtained from output of `DESC FILE FORMAT` once you have at least one file format object. Alternatively, data type is available in `CREATE FILE FORMAT` documentation.
2. `NULL_IF` format options should be passed as list of strings.

## Links

* [CREATE FILE FORMAT](https://docs.snowflake.com/en/sql-reference/sql/create-file-format.html)
* [SHOW FILE FORMATS](https://docs.snowflake.com/en/sql-reference/sql/show-file-formats.html)
* [DESC FILE FORMAT](https://docs.snowflake.com/en/sql-reference/sql/desc-file-format.html)
* [Parser & JSON Schema (GitHub)](https://github.com/littleK0i/SnowDDL/blob/master/snowddl/parser/file_format.py)
