Format Settings

If it is set to true, allow strings in single quotes.

## format\_csv\_delimiter[​](#format_csv_delimiter "Direct link to format_csv_delimiter")

The character to be considered as a delimiter in CSV data. If setting with a string, a string has to have a length of 1.

## format\_csv\_null\_representation[​](#format_csv_null_representation "Direct link to format_csv_null_representation")

Custom NULL representation in CSV format

## format\_custom\_escaping\_rule[​](#format_custom_escaping_rule "Direct link to format_custom_escaping_rule")

Field escaping rule (for CustomSeparated format)

## format\_custom\_field\_delimiter[​](#format_custom_field_delimiter "Direct link to format_custom_field_delimiter")

Delimiter between fields (for CustomSeparated format)

## format\_custom\_result\_after\_delimiter[​](#format_custom_result_after_delimiter "Direct link to format_custom_result_after_delimiter")

Suffix after result set (for CustomSeparated format)

## format\_custom\_result\_before\_delimiter[​](#format_custom_result_before_delimiter "Direct link to format_custom_result_before_delimiter")

Prefix before result set (for CustomSeparated format)

## format\_custom\_row\_after\_delimiter[​](#format_custom_row_after_delimiter "Direct link to format_custom_row_after_delimiter")

Delimiter after field of the last column (for CustomSeparated format)

## format\_custom\_row\_before\_delimiter[​](#format_custom_row_before_delimiter "Direct link to format_custom_row_before_delimiter")

Delimiter before field of the first column (for CustomSeparated format)

## format\_custom\_row\_between\_delimiter[​](#format_custom_row_between_delimiter "Direct link to format_custom_row_between_delimiter")

Delimiter between rows (for CustomSeparated format)

## format\_display\_secrets\_in\_show\_and\_select[​](#format_display_secrets_in_show_and_select "Direct link to format_display_secrets_in_show_and_select")

Enables or disables showing secrets in `SHOW` and `SELECT` queries for tables, databases,
table functions, and dictionaries.

User wishing to see secrets must also have
[`display_secrets_in_show_and_select` server setting](/docs/operations/server-configuration-parameters/settings#display_secrets_in_show_and_select)
turned on and a
[`displaySecretsInShowAndSelect`](/docs/sql-reference/statements/grant#displaysecretsinshowandselect) privilege.

Possible values:

- 0 — Disabled.
- 1 — Enabled.

## format\_json\_object\_each\_row\_column\_for\_object\_name[​](#format_json_object_each_row_column_for_object_name "Direct link to format_json_object_each_row_column_for_object_name")

The name of column that will be used for storing/writing object names in [JSONObjectEachRow](/docs/interfaces/formats/JSONObjectEachRow) format.
Column type should be String. If value is empty, default names `row_{i}`will be used for object names.

## format\_protobuf\_use\_autogenerated\_schema[​](#format_protobuf_use_autogenerated_schema "Direct link to format_protobuf_use_autogenerated_schema")

Use autogenerated Protobuf when format\_schema is not set

## format\_regexp[​](#format_regexp "Direct link to format_regexp")

Regular expression (for Regexp format)

## format\_regexp\_escaping\_rule[​](#format_regexp_escaping_rule "Direct link to format_regexp_escaping_rule")

Field escaping rule (for Regexp format)

## format\_regexp\_skip\_unmatched[​](#format_regexp_skip_unmatched "Direct link to format_regexp_skip_unmatched")

Skip lines unmatched by regular expression (for Regexp format)

## format\_schema[​](#format_schema "Direct link to format_schema")

This parameter is useful when you are using formats that require a schema definition, such as [Cap'n Proto](https://capnproto.org/) or [Protobuf](https://developers.google.com/protocol-buffers/). The value depends on the format.

## format\_schema\_message\_name[​](#format_schema_message_name "Direct link to format_schema_message_name")

Define the name of the required message in the schema defined in `format_schema`.
To maintain compatibility with the legacy format\_schema format (`file_name:message_name`):

- If `format_schema_message_name` is not specified, the message name is inferred from the `message_name` part of the legacy `format_schema` value.
- If `format_schema_message_name` is specified while using the legacy format, an error will be raised.

## format\_schema\_source[​](#format_schema_source "Direct link to format_schema_source")

Define the source of `format_schema`.
Possible values:

- 'file' (default): The `format_schema` is the name of a schema file located in the `format_schemas` directory.
- 'string': The `format_schema` is the literal content of the schema.
- 'query': The `format_schema` is a query to retrieve the schema.
  When `format_schema_source` is set to 'query', the following conditions apply:
- The query must return exactly one value: a single row with a single string column.
- The result of the query is treated as the schema content.
- This result is cached locally in the `format_schemas` directory.
- You can clear the local cache using the command: `SYSTEM DROP FORMAT SCHEMA CACHE FOR Files`.
- Once cached, identical queries are not executed to fetch the schema again until the cache is explicitly cleared
- In addition to local cache files, Protobuf messages are also cached in memory. Even after clearing the local cache files, the in-memory cache must be cleared using `SYSTEM DROP FORMAT SCHEMA CACHE [FOR Protobuf]` to fully refresh the schema.
- Run the query `SYSTEM DROP FORMAT SCHEMA CACHE` to clear the cache for both cache files and Protobuf messages schemas at once.

## format\_template\_resultset[​](#format_template_resultset "Direct link to format_template_resultset")

Path to file which contains format string for result set (for Template format)

## format\_template\_resultset\_format[​](#format_template_resultset_format "Direct link to format_template_resultset_format")

Format string for result set (for Template format)

## format\_template\_row[​](#format_template_row "Direct link to format_template_row")

Path to file which contains format string for rows (for Template format)

## format\_template\_row\_format[​](#format_template_row_format "Direct link to format_template_row_format")

Format string for rows (for Template format)

## format\_template\_rows\_between\_delimiter[​](#format_template_rows_between_delimiter "Direct link to format_template_rows_between_delimiter")

Delimiter between rows (for Template format)

## format\_tsv\_null\_representation[​](#format_tsv_null_representation "Direct link to format_tsv_null_representation")

Custom NULL representation in TSV format

## input\_format\_allow\_errors\_num[​](#input_format_allow_errors_num "Direct link to input_format_allow_errors_num")

Sets the maximum number of acceptable errors when reading from text formats (CSV, TSV, etc.).

The default value is 0.

Always pair it with `input_format_allow_errors_ratio`.

If an error occurred while reading rows but the error counter is still less than `input_format_allow_errors_num`, ClickHouse ignores the row and moves on to the next one.

If both `input_format_allow_errors_num` and `input_format_allow_errors_ratio` are exceeded, ClickHouse throws an exception.

## input\_format\_allow\_errors\_ratio[​](#input_format_allow_errors_ratio "Direct link to input_format_allow_errors_ratio")

Sets the maximum percentage of errors allowed when reading from text formats (CSV, TSV, etc.).
The percentage of errors is set as a floating-point number between 0 and 1.

The default value is 0.

Always pair it with `input_format_allow_errors_num`.

If an error occurred while reading rows but the error counter is still less than `input_format_allow_errors_ratio`, ClickHouse ignores the row and moves on to the next one.

If both `input_format_allow_errors_num` and `input_format_allow_errors_ratio` are exceeded, ClickHouse throws an exception.

## input\_format\_allow\_seeks[​](#input_format_allow_seeks "Direct link to input_format_allow_seeks")

Allow seeks while reading in ORC/Parquet/Arrow input formats.

Enabled by default.