# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snowddl.com/basic/yaml-configs/file-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
