> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Format Settings

> Settings which control input and output formats.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  const cells = [["Type", <Badge color="surface">{type}</Badge>], ["Default value", <Badge color="surface">{default_value}</Badge>]];
  if (changeable_without_restart) {
    const isYes = String(changeable_without_restart).trim().toLowerCase() === "yes";
    const badge = isYes ? <Badge icon="check" stroke color="green" size="sm">Yes</Badge> : <Badge icon="x" stroke color="red" size="sm">No</Badge>;
    cells.push(["Changeable without restart", badge]);
  }
  return <table>
      <thead>
        <tr>
          {cells.map(([h]) => <th key={h}>{h}</th>)}
        </tr>
      </thead>
      <tbody>
        <tr>
          {cells.map(([h, v]) => <td key={h}>{v}</td>)}
        </tr>
      </tbody>
    </table>;
};

export const galaxyOnClick = eventName => () => {
  try {
    if (typeof window !== "undefined" && window.galaxy && eventName) {
      window.galaxy.track(eventName, {
        interaction: "click"
      });
    }
  } catch (e) {}
};

export const BetaBadge = ({link, galaxyTrack, galaxyEvent}) => {
  if (link) {
    return <a href={link} target="_blank" rel="noopener noreferrer" className="betaBadge" onClick={galaxyTrack && galaxyEvent ? galaxyOnClick(galaxyEvent) : undefined}>
                <Icon />
                <span>Beta</span>
            </a>;
  }
  return <div className="betaBadge">
            <Icon />
            <span>
                Beta feature. 
                <u>
                    <a href="/docs/beta-and-experimental-features#beta-features">
                        Learn more.
                    </a>
                </u>
            </span>
        </div>;
};

export const ExperimentalBadge = () => {
  return <div className="experimentalBadge">
            <div className="experimentalIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path strokeWidth="1.25" d="M5.5 2H10.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M9.50015 2V6.19625L13.4283 12.7425C13.4738 12.8183 13.4985 12.9049 13.4996 12.9934C13.5008 13.0818 13.4785 13.169 13.435 13.246C13.3914 13.323 13.3283 13.3871 13.2519 13.4317C13.1755 13.4764 13.0886 13.4999 13.0002 13.5H3.00015C2.91164 13.5 2.8247 13.4766 2.74822 13.432C2.67174 13.3874 2.60847 13.3233 2.56487 13.2463C2.52126 13.1693 2.49889 13.082 2.50004 12.9935C2.50119 12.905 2.52582 12.8184 2.5714 12.7425L6.50015 6.19625V2" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path strokeWidth="1.25" d="M4.47656 9.56754C5.30344 9.41254 6.47656 9.47942 7.99969 10.25C10.0153 11.2707 11.4216 11.0569 12.2184 10.7282" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            Experimental feature. <u><a href="/docs/beta-and-experimental-features#experimental-features">Learn more.</a></u>
        </div>;
};

These settings are autogenerated from [source](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h).

<h2 id="allow_special_bool_values_inside_variant">
  allow\_special\_bool\_values\_inside\_variant
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Allows to parse Bool values inside Variant type from special text bool values like "on", "off", "enable", "disable", etc.

<h2 id="bool_false_representation">
  bool\_false\_representation
</h2>

<SettingsInfoBlock type="String" default_value="false" />

Text to represent false bool value in TSV/CSV/Vertical/Pretty formats.

<h2 id="bool_true_representation">
  bool\_true\_representation
</h2>

<SettingsInfoBlock type="String" default_value="true" />

Text to represent true bool value in TSV/CSV/Vertical/Pretty formats.

<h2 id="check_conversion_from_numbers_to_enum">
  check\_conversion\_from\_numbers\_to\_enum
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Throw an exception during Numbers to Enum conversion if the value does not exist in Enum.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

**Example**

```text theme={null}
CREATE TABLE tab (
  val Enum('first' = 1, 'second' = 2, 'third' = 3)
) ENGINE = Memory;

INSERT INTO tab SETTINGS check_conversion_from_numbers_to_enum = 1 VALUES (4); -- returns an error
```

<h2 id="column_names_for_schema_inference">
  column\_names\_for\_schema\_inference
</h2>

The list of column names to use in schema inference for formats without column names. The format: 'column1,column2,column3,...'

<h2 id="date_time_64_output_format_cut_trailing_zeros_align_to_groups_of_thousands">
  date\_time\_64\_output\_format\_cut\_trailing\_zeros\_align\_to\_groups\_of\_thousands
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Dynamically trim the trailing zeros of datetime64 values to adjust the output scale to \[0, 3, 6],
corresponding to 'seconds', 'milliseconds', and 'microseconds'

<h2 id="date_time_input_format">
  date\_time\_input\_format
</h2>

<SettingsInfoBlock type="DateTimeInputFormat" default_value="best_effort" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "best_effort"},{"label": "Better usability"}]}]} />

Allows choosing a parser of the text representation of date and time.

The setting does not apply to [date and time functions](/reference/functions/regular-functions/date-time-functions).

Possible values:

* `'best_effort'` — Enables extended parsing.

  ClickHouse can parse the basic `YYYY-MM-DD HH:MM:SS` format and all [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time formats. For example, `'2018-06-08T01:02:03.000Z'`.

* `'best_effort_us'` — Similar to `best_effort` (see the difference in [parseDateTimeBestEffortUS](/reference/functions/regular-functions/type-conversion-functions#parseDateTimeBestEffortUS)

* `'basic'` — Use basic parser.

  ClickHouse can parse only the basic `YYYY-MM-DD HH:MM:SS` or `YYYY-MM-DD` format. For example, `2019-08-20 10:18:56` or `2019-08-20`.

See also:

* [DateTime data type.](/reference/data-types/datetime)
* [Functions for working with dates and times.](/reference/functions/regular-functions/date-time-functions)

<h2 id="date_time_output_format">
  date\_time\_output\_format
</h2>

<SettingsInfoBlock type="DateTimeOutputFormat" default_value="simple" />

Allows choosing different output formats of the text representation of date and time.

Possible values:

* `simple` - Simple output format.

  ClickHouse output date and time `YYYY-MM-DD hh:mm:ss` format. For example, `2019-08-20 10:18:56`. The calculation is performed according to the data type's time zone (if present) or server time zone.

* `iso` - ISO output format.

  ClickHouse output date and time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) `YYYY-MM-DDThh:mm:ssZ` format. For example, `2019-08-20T10:18:56Z`. Note that output is in UTC (`Z` means UTC).

* `unix_timestamp` - Unix timestamp output format.

  ClickHouse output date and time in [Unix timestamp](https://en.wikipedia.org/wiki/Unix_time) format. For example `1566285536`.

See also:

* [DateTime data type.](/reference/data-types/datetime)
* [Functions for working with dates and times.](/reference/functions/regular-functions/date-time-functions)

<h2 id="date_time_overflow_behavior">
  date\_time\_overflow\_behavior
</h2>

<SettingsInfoBlock type="DateTimeOverflowBehavior" default_value="ignore" />

Defines the behavior when [Date](/reference/data-types/date), [Date32](/reference/data-types/date32), [DateTime](/reference/data-types/datetime), [DateTime64](/reference/data-types/datetime64) or integers are converted into Date, Date32, DateTime or DateTime64 but the value cannot be represented in the result type.

Possible values:

* `ignore` — Silently ignore overflows. Result are undefined.
* `throw` — Throw an exception in case of overflow.
* `saturate` — Saturate the result. If the value is smaller than the smallest value that can be represented by the target type, the result is chosen as the smallest representable value. If the value is bigger than the largest value that can be represented by the target type, the result is chosen as the largest representable value.

Default value: `ignore`.

<h2 id="errors_output_format">
  errors\_output\_format
</h2>

<SettingsInfoBlock type="String" default_value="CSV" />

Method to write Errors to text output.

<h2 id="format_avro_schema_registry_connection_timeout">
  format\_avro\_schema\_registry\_connection\_timeout
</h2>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "New setting to control the connection timeout (in seconds) for the Confluent Schema Registry HTTP client used by AvroConfluent format."}]}]} />

For AvroConfluent format: connection timeout in seconds for the Confluent Schema Registry HTTP client. Used by both schema fetch and schema registration. Must be greater than 0 and less than 600 (10 minutes).

<h2 id="format_avro_schema_registry_receive_timeout">
  format\_avro\_schema\_registry\_receive\_timeout
</h2>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "New setting to control the receive timeout (in seconds) for the Confluent Schema Registry HTTP client used by AvroConfluent format."}]}]} />

For AvroConfluent format: receive timeout in seconds for the Confluent Schema Registry HTTP client. Used by both schema fetch and schema registration. Must be greater than 0 and less than 600 (10 minutes).

<h2 id="format_avro_schema_registry_send_timeout">
  format\_avro\_schema\_registry\_send\_timeout
</h2>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "1"},{"label": "New setting to control the send timeout (in seconds) for the Confluent Schema Registry HTTP client used by AvroConfluent format."}]}]} />

For AvroConfluent format: send timeout in seconds for the Confluent Schema Registry HTTP client. Used by both schema fetch and schema registration. Must be greater than 0 and less than 600 (10 minutes).

<h2 id="format_avro_schema_registry_url">
  format\_avro\_schema\_registry\_url
</h2>

For AvroConfluent format: Confluent Schema Registry URL.

<h2 id="format_binary_max_array_size">
  format\_binary\_max\_array\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1073741824" />

The maximum allowed size for Array in RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit

<h2 id="format_binary_max_object_size">
  format\_binary\_max\_object\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="100000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.12"},{"label": "100000"},{"label": "New setting that limits the maximum size of object during JSON type binary deserialization"}]}]} />

The maximum allowed number of paths in a single Object for JSON type RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit

<h2 id="format_binary_max_string_size">
  format\_binary\_max\_string\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1073741824" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.12"},{"label": "1073741824"},{"label": "Prevent allocating large amount of memory"}]}]} />

The maximum allowed size for String in RowBinary format. It prevents allocating large amount of memory in case of corrupted data. 0 means there is no limit

<h2 id="format_capn_proto_enum_comparising_mode">
  format\_capn\_proto\_enum\_comparising\_mode
</h2>

<SettingsInfoBlock type="CapnProtoEnumComparingMode" default_value="by_values" />

How to map ClickHouse Enum and CapnProto Enum

<h2 id="format_capn_proto_max_message_size">
  format\_capn\_proto\_max\_message\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1073741824" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.12"},{"label": "1073741824"},{"label": "Prevent allocating large amount of memory"}]}]} />

Maximum size of a single CapnProto message in bytes. This protects against malformed or corrupted data causing excessive memory allocation. Default is 1 GiB.

<h2 id="format_capn_proto_use_autogenerated_schema">
  format\_capn\_proto\_use\_autogenerated\_schema
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Use autogenerated CapnProto schema when format\_schema is not set

<h2 id="format_csv_allow_double_quotes">
  format\_csv\_allow\_double\_quotes
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

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

<h2 id="format_csv_allow_single_quotes">
  format\_csv\_allow\_single\_quotes
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.7"},{"label": "0"},{"label": "Most tools don't treat single quote in CSV specially, don't do it by default too"}]}]} />

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

<h2 id="format_csv_delimiter">
  format\_csv\_delimiter
</h2>

<SettingsInfoBlock type="Char" default_value="," />

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.

<h2 id="format_csv_null_representation">
  format\_csv\_null\_representation
</h2>

<SettingsInfoBlock type="String" default_value="\N" />

Custom NULL representation in CSV format

<h2 id="format_custom_escaping_rule">
  format\_custom\_escaping\_rule
</h2>

<SettingsInfoBlock type="EscapingRule" default_value="Escaped" />

Field escaping rule (for CustomSeparated format)

<h2 id="format_custom_field_delimiter">
  format\_custom\_field\_delimiter
</h2>

<SettingsInfoBlock type="String" default_value="	" />

Delimiter between fields (for CustomSeparated format)

<h2 id="format_custom_result_after_delimiter">
  format\_custom\_result\_after\_delimiter
</h2>

Suffix after result set (for CustomSeparated format)

<h2 id="format_custom_result_before_delimiter">
  format\_custom\_result\_before\_delimiter
</h2>

Prefix before result set (for CustomSeparated format)

<h2 id="format_custom_row_after_delimiter">
  format\_custom\_row\_after\_delimiter
</h2>

<SettingsInfoBlock
  type="String"
  default_value="
"
/>

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

<h2 id="format_custom_row_before_delimiter">
  format\_custom\_row\_before\_delimiter
</h2>

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

<h2 id="format_custom_row_between_delimiter">
  format\_custom\_row\_between\_delimiter
</h2>

Delimiter between rows (for CustomSeparated format)

<h2 id="format_display_secrets_in_show_and_select">
  format\_display\_secrets\_in\_show\_and\_select
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

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](/reference/settings/server-settings/settings#display_secrets_in_show_and_select)
turned on and a
[`displaySecretsInShowAndSelect`](/reference/statements/grant#displaysecretsinshowandselect) privilege.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="format_json_object_each_row_column_for_object_name">
  format\_json\_object\_each\_row\_column\_for\_object\_name
</h2>

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

<h2 id="format_protobuf_use_autogenerated_schema">
  format\_protobuf\_use\_autogenerated\_schema
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Use autogenerated Protobuf when format\_schema is not set

<h2 id="format_regexp">
  format\_regexp
</h2>

Regular expression (for Regexp format)

<h2 id="format_regexp_escaping_rule">
  format\_regexp\_escaping\_rule
</h2>

<SettingsInfoBlock type="EscapingRule" default_value="Raw" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "20.10"},{"label": "Raw"},{"label": "Use Raw as default escaping rule for Regexp format to male the behaviour more like to what users expect"}]}]} />

Field escaping rule (for Regexp format)

<h2 id="format_regexp_skip_unmatched">
  format\_regexp\_skip\_unmatched
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip lines unmatched by regular expression (for Regexp format)

<h2 id="format_schema">
  format\_schema
</h2>

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.

<h2 id="format_schema_message_name">
  format\_schema\_message\_name
</h2>

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.6"},{"label": ""},{"label": "New setting"}]}]} />

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.

<h2 id="format_schema_source">
  format\_schema\_source
</h2>

<SettingsInfoBlock type="String" default_value="file" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.6"},{"label": "file"},{"label": "New setting"}]}]} />

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.

<h2 id="format_template_resultset">
  format\_template\_resultset
</h2>

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

<h2 id="format_template_resultset_format">
  format\_template\_resultset\_format
</h2>

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": ""},{"label": "Template result set format string can be set in query"}]}]} />

Format string for result set (for Template format)

<h2 id="format_template_row">
  format\_template\_row
</h2>

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

<h2 id="format_template_row_format">
  format\_template\_row\_format
</h2>

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": ""},{"label": "Template row format string can be set directly in query"}]}]} />

Format string for rows (for Template format)

<h2 id="format_template_rows_between_delimiter">
  format\_template\_rows\_between\_delimiter
</h2>

<SettingsInfoBlock
  type="String"
  default_value="
"
/>

Delimiter between rows (for Template format)

<h2 id="format_tsv_null_representation">
  format\_tsv\_null\_representation
</h2>

<SettingsInfoBlock type="String" default_value="\N" />

Custom NULL representation in TSV format

<h2 id="input_format_allow_errors_num">
  input\_format\_allow\_errors\_num
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

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.

<h2 id="input_format_allow_errors_ratio">
  input\_format\_allow\_errors\_ratio
</h2>

<SettingsInfoBlock type="Float" default_value="0" />

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.

<h2 id="input_format_allow_seeks">
  input\_format\_allow\_seeks
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Allow seeks (or range reads) while reading ORC, Parquet, and Arrow input formats.
When enabled and the source supports it (e.g. local file, S3, HTTP with range support and known size),
ClickHouse can read only the needed byte ranges and use less memory.
When disabled, or when the source does not support seeks (e.g. no file size, or stream not seekable),
some readers may fall back to loading the full file into memory.
Enabled by default.

<h2 id="input_format_arrow_allow_missing_columns">
  input\_format\_arrow\_allow\_missing\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.12"},{"label": "1"},{"label": "Allow missing columns in Arrow files by default"}]}]} />

Allow missing columns while reading Arrow input formats

<h2 id="input_format_arrow_case_insensitive_column_matching">
  input\_format\_arrow\_case\_insensitive\_column\_matching
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore case when matching Arrow columns with CH columns.

<h2 id="input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference">
  input\_format\_arrow\_skip\_columns\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip columns with unsupported types while schema inference for format Arrow

<h2 id="input_format_avro_allow_missing_fields">
  input\_format\_avro\_allow\_missing\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

For Avro/AvroConfluent format: when field is not found in schema use default value instead of error

<h2 id="input_format_avro_null_as_default">
  input\_format\_avro\_null\_as\_default
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

For Avro/AvroConfluent format: insert default in case of null and non Nullable colum

<h2 id="input_format_binary_decode_types_in_binary_format">
  input\_format\_binary\_decode\_types\_in\_binary\_format
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "0"},{"label": "Added new setting to allow to read type names in binary format in RowBinaryWithNamesAndTypes input format"}]}]} />

Read data types in binary format instead of type names in RowBinaryWithNamesAndTypes input format

<h2 id="input_format_binary_max_type_complexity">
  input\_format\_binary\_max\_type\_complexity
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.1"},{"label": "1000"},{"label": "Add a new setting to control max number of type nodes when decoding binary types. Protects against malicious inputs."}]}]} />

Max type nodes when decoding binary types (not depth, but total count). `Map(String, UInt32)` = 3 nodes. Protects against malicious inputs. 0 = unlimited.

<h2 id="input_format_binary_read_json_as_string">
  input\_format\_binary\_read\_json\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "0"},{"label": "Add new setting to read values of JSON type as JSON string in RowBinary input format"}]}]} />

Read values of [JSON](/reference/data-types/newjson) data type as JSON [String](/reference/data-types/string) values in RowBinary input format.

<h2 id="input_format_bson_skip_fields_with_unsupported_types_in_schema_inference">
  input\_format\_bson\_skip\_fields\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip fields with unsupported types while schema inference for format BSON.

<h2 id="input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference">
  input\_format\_capn\_proto\_skip\_fields\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip columns with unsupported types while schema inference for format CapnProto

<h2 id="input_format_column_name_matching_mode">
  input\_format\_column\_name\_matching\_mode
</h2>

<SettingsInfoBlock type="InputFormatColumnMatchingCaseSensitivity" default_value="auto" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": "auto"},{"label": "Match input column names case-sensitively first and fall back to case-insensitive matching, instead of requiring an exact case match."}]}, {"id": "row-2","items": [{"label": "26.4"},{"label": "match_case"},{"label": "New setting."}]}]} />

Defines the column name matching mode when ingesting data through various formats (including but not limited to JSONEachRow, CSVWithNames, JSONColumns, BSONEachRow, RowBinaryWithNames).
Supported modes:

* match\_case: match case-sensitively
* ignore\_case: match case-insensitively
* auto: first tries to match case-sensitively, if fails, tries to match case-insensitively.

<h2 id="input_format_connection_handling">
  input\_format\_connection\_handling
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "0"},{"label": "New setting to allow parsing and processing remaining data in the buffer if the connection closes unexpectedly"}]}]} />

When this option is enabled, if the connection closes unexpectedly, any remaining data in the buffer will be parsed and processed instead of being treated as an error

<Note>
  Enabling this option disables parallel parsing and makes deduplication impossible
</Note>

<h2 id="input_format_csv_allow_cr_end_of_line">
  input\_format\_csv\_allow\_cr\_end\_of\_line
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

If it is set true, \r will be allowed at end of line not followed by

<h2 id="input_format_csv_allow_variable_number_of_columns">
  input\_format\_csv\_allow\_variable\_number\_of\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore extra columns in CSV input (if file has more columns than expected) and treat missing fields in CSV input as default values

<h2 id="input_format_csv_allow_whitespace_or_tab_as_delimiter">
  input\_format\_csv\_allow\_whitespace\_or\_tab\_as\_delimiter
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Allow to use spaces and tabs(\t) as field delimiter in the CSV strings

<h2 id="input_format_csv_arrays_as_nested_csv">
  input\_format\_csv\_arrays\_as\_nested\_csv
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When reading Array from CSV, expect that its elements were serialized in nested CSV and then put into string. Example: "\[""Hello"", ""world"", ""42"""" TV""]". Braces around array can be omitted.

<h2 id="input_format_csv_deserialize_separate_columns_into_tuple">
  input\_format\_csv\_deserialize\_separate\_columns\_into\_tuple
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}, {"id": "row-2","items": [{"label": "24.3"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}]} />

If it set to true, then separate columns written in CSV format can be deserialized to Tuple column.

<h2 id="input_format_csv_detect_header">
  input\_format\_csv\_detect\_header
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.1"},{"label": "1"},{"label": "Detect header in CSV format by default"}]}]} />

Automatically detect header with names and types in CSV format

<h2 id="input_format_csv_empty_as_default">
  input\_format\_csv\_empty\_as\_default
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Treat empty fields in CSV input as default values.

<h2 id="input_format_csv_enum_as_number">
  input\_format\_csv\_enum\_as\_number
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Treat inserted enum values in CSV formats as enum indices

<h2 id="input_format_csv_skip_first_lines">
  input\_format\_csv\_skip\_first\_lines
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

Skip specified number of lines at the beginning of data in CSV format

<h2 id="input_format_csv_skip_trailing_empty_lines">
  input\_format\_csv\_skip\_trailing\_empty\_lines
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip trailing empty lines in CSV format

<h2 id="input_format_csv_trim_whitespaces">
  input\_format\_csv\_trim\_whitespaces
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Trims spaces and tabs (\t) characters at the beginning and end in CSV strings

<h2 id="input_format_csv_try_infer_numbers_from_strings">
  input\_format\_csv\_try\_infer\_numbers\_from\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

If enabled, during schema inference ClickHouse will try to infer numbers from string fields.
It can be useful if CSV data contains quoted UInt64 numbers.

Disabled by default.

<h2 id="input_format_csv_try_infer_strings_from_quoted_tuples">
  input\_format\_csv\_try\_infer\_strings\_from\_quoted\_tuples
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}, {"id": "row-2","items": [{"label": "24.3"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}]} />

Interpret quoted tuples in the input data as a value of type String.

<h2 id="input_format_csv_use_best_effort_in_schema_inference">
  input\_format\_csv\_use\_best\_effort\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Use some tweaks and heuristics to infer schema in CSV format

<h2 id="input_format_csv_use_default_on_bad_values">
  input\_format\_csv\_use\_default\_on\_bad\_values
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Allow to set default value to column when CSV field deserialization failed on bad value

<h2 id="input_format_custom_allow_variable_number_of_columns">
  input\_format\_custom\_allow\_variable\_number\_of\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore extra columns in CustomSeparated input (if file has more columns than expected) and treat missing fields in CustomSeparated input as default values

<h2 id="input_format_custom_detect_header">
  input\_format\_custom\_detect\_header
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.1"},{"label": "1"},{"label": "Detect header in CustomSeparated format by default"}]}]} />

Automatically detect header with names and types in CustomSeparated format

<h2 id="input_format_custom_skip_trailing_empty_lines">
  input\_format\_custom\_skip\_trailing\_empty\_lines
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip trailing empty lines in CustomSeparated format

<h2 id="input_format_defaults_for_omitted_fields">
  input\_format\_defaults\_for\_omitted\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "19.12"},{"label": "1"},{"label": "Enable calculation of complex default expressions for omitted fields for some input formats, because it should be the expected behaviour"}]}]} />

When performing `INSERT` queries, replace omitted input column values with default values of the respective columns. This option applies to [JSONEachRow](/reference/formats/JSON/JSONEachRow) (and other JSON formats), [CSV](/reference/formats/CSV/CSV), [TabSeparated](/reference/formats/TabSeparated/TabSeparated), [TSKV](/reference/formats/TabSeparated/TSKV), [Parquet](/reference/formats/Parquet/Parquet), [Arrow](/reference/formats/Arrow/Arrow), [Avro](/reference/formats/Avro/Avro), [ORC](/reference/formats/ORC), [Native](/reference/formats/Native) formats and formats with `WithNames`/`WithNamesAndTypes` suffixes.

<Note>
  When this option is enabled, extended table metadata are sent from server to client. It consumes additional computing resources on the server and can reduce performance.
</Note>

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="input_format_force_null_for_omitted_fields">
  input\_format\_force\_null\_for\_omitted\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.5"},{"label": "0"},{"label": "Disable type-defaults for omitted fields when needed"}]}]} />

Force initialize omitted fields with null values

<h2 id="input_format_hive_text_allow_variable_number_of_columns">
  input\_format\_hive\_text\_allow\_variable\_number\_of\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.4"},{"label": "1"},{"label": "Ignore extra columns in Hive Text input (if file has more columns than expected) and treat missing fields in Hive Text input as default values."}]}]} />

Ignore extra columns in Hive Text input (if file has more columns than expected) and treat missing fields in Hive Text input as default values

<h2 id="input_format_hive_text_collection_items_delimiter">
  input\_format\_hive\_text\_collection\_items\_delimiter
</h2>

<SettingsInfoBlock type="Char" default_value="" />

Delimiter between collection(array or map) items in Hive Text File

<h2 id="input_format_hive_text_fields_delimiter">
  input\_format\_hive\_text\_fields\_delimiter
</h2>

<SettingsInfoBlock type="Char" default_value="" />

Delimiter between fields in Hive Text File

<h2 id="input_format_hive_text_map_keys_delimiter">
  input\_format\_hive\_text\_map\_keys\_delimiter
</h2>

<SettingsInfoBlock type="Char" default_value="" />

Delimiter between a pair of map key/values in Hive Text File

<h2 id="input_format_import_nested_json">
  input\_format\_import\_nested\_json
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enables or disables the insertion of JSON data with nested objects.

Supported formats:

* [JSONEachRow](/reference/formats/JSON/JSONEachRow)

Possible values:

* 0 — Disabled.
* 1 — Enabled.

See also:

* [Usage of Nested Structures](/guides/clickhouse/data-formats/json/formats#accessing-nested-json-objects) with the `JSONEachRow` format.

<h2 id="input_format_ipv4_default_on_conversion_error">
  input\_format\_ipv4\_default\_on\_conversion\_error
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Deserialization of IPv4 will use default values instead of throwing exception on conversion error.

Disabled by default.

<h2 id="input_format_ipv6_default_on_conversion_error">
  input\_format\_ipv6\_default\_on\_conversion\_error
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Deserialization of IPV6 will use default values instead of throwing exception on conversion error.

Disabled by default.

<h2 id="input_format_json_compact_allow_variable_number_of_columns">
  input\_format\_json\_compact\_allow\_variable\_number\_of\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Allow variable number of columns in rows in JSONCompact/JSONCompactEachRow input formats.
Ignore extra columns in rows with more columns than expected and treat missing columns as default values.

Disabled by default.

<h2 id="input_format_json_defaults_for_missing_elements_in_named_tuple">
  input\_format\_json\_defaults\_for\_missing\_elements\_in\_named\_tuple
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.1"},{"label": "1"},{"label": "Allow missing elements in JSON objects while reading named tuples by default"}]}]} />

Insert default values for missing elements in JSON object while parsing named tuple.
This setting works only when setting `input_format_json_named_tuples_as_objects` is enabled.

Enabled by default.

<h2 id="input_format_json_empty_as_default">
  input\_format\_json\_empty\_as\_default
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.9"},{"label": "0"},{"label": "Added new setting to allow to treat empty fields in JSON input as default values."}]}]} />

When enabled, replace empty input fields in JSON with default values. For complex default expressions `input_format_defaults_for_omitted_fields` must be enabled too.

Possible values:

* 0 — Disable.
* 1 — Enable.

<h2 id="input_format_json_ignore_unknown_keys_in_named_tuple">
  input\_format\_json\_ignore\_unknown\_keys\_in\_named\_tuple
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.3"},{"label": "1"},{"label": "Improve parsing JSON objects as named tuples"}]}]} />

Ignore unknown keys in json object for named tuples.

Enabled by default.

<h2 id="input_format_json_ignore_unnecessary_fields">
  input\_format\_json\_ignore\_unnecessary\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.4"},{"label": "1"},{"label": "Ignore unnecessary fields and not parse them. Enabling this may not throw exceptions on json strings of invalid format or with duplicated fields"}]}]} />

Ignore unnecessary fields and not parse them. Enabling this may not throw exceptions on json strings of invalid format or with duplicated fields

<h2 id="input_format_json_infer_array_of_dynamic_from_array_of_different_types">
  input\_format\_json\_infer\_array\_of\_dynamic\_from\_array\_of\_different\_types
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "Infer Array(Dynamic) for JSON arrays with different values types by default"}]}]} />

If enabled, during schema inference ClickHouse will use Array(Dynamic) type for JSON arrays with values of different data types.

Example:

```sql theme={null}
SET input_format_json_infer_array_of_dynamic_from_array_of_different_types=1;
DESC format(JSONEachRow, '{"a" : [42, "hello", [1, 2, 3]]}');
```

```response theme={null}
┌─name─┬─type───────────┐
│ a    │ Array(Dynamic) │
└──────┴────────────────┘
```

```sql theme={null}
SET input_format_json_infer_array_of_dynamic_from_array_of_different_types=0;
DESC format(JSONEachRow, '{"a" : [42, "hello", [1, 2, 3]]}');
```

```response theme={null}
┌─name─┬─type─────────────────────────────────────────────────────────────┐
│ a    │ Tuple(Nullable(Int64), Nullable(String), Array(Nullable(Int64))) │
└──────┴──────────────────────────────────────────────────────────────────┘
```

Enabled by default.

<h2 id="input_format_json_infer_incomplete_types_as_strings">
  input\_format\_json\_infer\_incomplete\_types\_as\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.9"},{"label": "1"},{"label": "Allow to infer incomplete types as Strings in JSON formats by default"}]}]} />

Allow to use String type for JSON keys that contain only `Null`/`{}`/`[]` in data sample during schema inference.
In JSON formats any value can be read as String, and we can avoid errors like `Cannot determine type for column 'column_name' by first 25000 rows of data, most likely this column contains only Nulls or empty Arrays/Maps` during schema inference
by using String type for keys with unknown types.

Example:

```sql theme={null}
SET input_format_json_infer_incomplete_types_as_strings = 1, input_format_json_try_infer_named_tuples_from_objects = 1;
DESCRIBE format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}');
SELECT * FROM format(JSONEachRow, '{"obj" : {"a" : [1,2,3], "b" : "hello", "c" : null, "d" : {}, "e" : []}}');
```

Result:

```
┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ obj  │ Tuple(a Array(Nullable(Int64)), b Nullable(String), c Nullable(String), d Nullable(String), e Array(Nullable(String))) │              │                    │         │                  │                │
└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘

┌─obj────────────────────────────┐
│ ([1,2,3],'hello',NULL,'{}',[]) │
└────────────────────────────────┘
```

Enabled by default.

<h2 id="input_format_json_map_as_array_of_tuples">
  input\_format\_json\_map\_as\_array\_of\_tuples
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.7"},{"label": "0"},{"label": "New setting"}]}]} />

Deserialize maps columns as JSON arrays of tuples.

Disabled by default.

<h2 id="input_format_json_max_depth">
  input\_format\_json\_max\_depth
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.8"},{"label": "1000"},{"label": "It was unlimited in previous versions, but that was unsafe."}]}]} />

Maximum depth of a field in JSON. This is not a strict limit, it does not have to be applied precisely.

<h2 id="input_format_json_named_tuples_as_objects">
  input\_format\_json\_named\_tuples\_as\_objects
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Parse named tuple columns as JSON objects.

Enabled by default.

<h2 id="input_format_json_read_arrays_as_strings">
  input\_format\_json\_read\_arrays\_as\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.9"},{"label": "1"},{"label": "Allow to read arrays as strings in JSON formats by default"}]}]} />

Allow parsing JSON arrays as strings in JSON input formats.

Example:

```sql theme={null}
SET input_format_json_read_arrays_as_strings = 1;
SELECT arr, toTypeName(arr), JSONExtractArrayRaw(arr)[3] from format(JSONEachRow, 'arr String', '{"arr" : [1, "Hello", [1,2,3]]}');
```

Result:

```
┌─arr───────────────────┬─toTypeName(arr)─┬─arrayElement(JSONExtractArrayRaw(arr), 3)─┐
│ [1, "Hello", [1,2,3]] │ String          │ [1,2,3]                                   │
└───────────────────────┴─────────────────┴───────────────────────────────────────────┘
```

Enabled by default.

<h2 id="input_format_json_read_bools_as_numbers">
  input\_format\_json\_read\_bools\_as\_numbers
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Allow parsing bools as numbers in JSON input formats.

Enabled by default.

<h2 id="input_format_json_read_bools_as_strings">
  input\_format\_json\_read\_bools\_as\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "1"},{"label": "Allow to read bools as strings in JSON formats by default"}]}]} />

Allow parsing bools as strings in JSON input formats.

Enabled by default.

<h2 id="input_format_json_read_numbers_as_strings">
  input\_format\_json\_read\_numbers\_as\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.9"},{"label": "1"},{"label": "Allow to read numbers as strings in JSON formats by default"}]}]} />

Allow parsing numbers as strings in JSON input formats.

Enabled by default.

<h2 id="input_format_json_read_objects_as_strings">
  input\_format\_json\_read\_objects\_as\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.1"},{"label": "1"},{"label": "Enable reading nested json objects as strings while object type is experimental"}]}]} />

Allow parsing JSON objects as strings in JSON input formats.

Example:

```sql theme={null}
SET input_format_json_read_objects_as_strings = 1;
CREATE TABLE test (id UInt64, obj String, date Date) ENGINE=Memory();
INSERT INTO test FORMAT JSONEachRow {"id" : 1, "obj" : {"a" : 1, "b" : "Hello"}, "date" : "2020-01-01"};
SELECT * FROM test;
```

Result:

```
┌─id─┬─obj──────────────────────┬───────date─┐
│  1 │ {"a" : 1, "b" : "Hello"} │ 2020-01-01 │
└────┴──────────────────────────┴────────────┘
```

Enabled by default.

<h2 id="input_format_json_throw_on_bad_escape_sequence">
  input\_format\_json\_throw\_on\_bad\_escape\_sequence
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.4"},{"label": "1"},{"label": "Allow to save JSON strings with bad escape sequences"}]}]} />

Throw an exception if JSON string contains bad escape sequence in JSON input formats. If disabled, bad escape sequences will remain as is in the data.

Enabled by default.

<h2 id="input_format_json_try_infer_named_tuples_from_objects">
  input\_format\_json\_try\_infer\_named\_tuples\_from\_objects
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.9"},{"label": "1"},{"label": "Try to infer named Tuples from JSON objects by default"}]}]} />

If enabled, during schema inference ClickHouse will try to infer named Tuple from JSON objects.
The resulting named Tuple will contain all elements from all corresponding JSON objects from sample data.

Example:

```sql theme={null}
SET input_format_json_try_infer_named_tuples_from_objects = 1;
DESC format(JSONEachRow, '{"obj" : {"a" : 42, "b" : "Hello"}}, {"obj" : {"a" : 43, "c" : [1, 2, 3]}}, {"obj" : {"d" : {"e" : 42}}}')
```

Result:

```
┌─name─┬─type───────────────────────────────────────────────────────────────────────────────────────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
│ obj  │ Tuple(a Nullable(Int64), b Nullable(String), c Array(Nullable(Int64)), d Tuple(e Nullable(Int64))) │              │                    │         │                  │                │
└──────┴────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘
```

Enabled by default.

<h2 id="input_format_json_try_infer_numbers_from_strings">
  input\_format\_json\_try\_infer\_numbers\_from\_strings
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.9"},{"label": "0"},{"label": "Don't infer numbers from strings in JSON formats by default to prevent possible parsing errors"}]}]} />

If enabled, during schema inference ClickHouse will try to infer numbers from string fields.
It can be useful if JSON data contains quoted UInt64 numbers.

Disabled by default.

<h2 id="input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects">
  input\_format\_json\_use\_string\_type\_for\_ambiguous\_paths\_in\_named\_tuples\_inference\_from\_objects
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "0"},{"label": "Allow to use String type for ambiguous paths during named tuple inference from JSON objects"}]}]} />

Use String type instead of an exception in case of ambiguous paths in JSON objects during named tuples inference

<h2 id="input_format_json_validate_types_from_metadata">
  input\_format\_json\_validate\_types\_from\_metadata
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

For JSON/JSONCompact/JSONColumnsWithMetadata input formats, if this setting is set to 1,
the types from metadata in input data will be compared with the types of the corresponding columns from the table.

Enabled by default.

<h2 id="input_format_max_block_size_bytes">
  input\_format\_max\_block\_size\_bytes
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "0"},{"label": "New setting to limit bytes size if blocks created by input format"}]}]} />

Limits the size of the blocks formed during data parsing in input formats in bytes. Used in row based input formats when block is formed on ClickHouse side.
0 means no limit in bytes.

<h2 id="input_format_max_block_wait_ms">
  input\_format\_max\_block\_wait\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "0"},{"label": "New setting to limit maximum wait time in milliseconds before a block is emitted by input format"}]}]} />

Limits the maximum time in milliseconds to wait before emitting a block during parsing in row-based input formats. 0 means no limit.

<Note>
  This option only works if `input_format_connection_handling` is enabled. Setting a value also disables parallel parsing and makes deduplication impossible.
</Note>

<Note>
  For streaming inserts, you must also set `min_insert_block_size_rows=0` and `min_insert_block_size_bytes=0`. Otherwise, parsed blocks may still be accumulated in memory by the block squashing stage until those thresholds are reached, preventing timely inserts.
</Note>

**Example: streaming Wikipedia recent changes into ClickHouse**

```bash theme={null}
clickhouse-client --query 'CREATE TABLE wikipedia_edits (data JSON)'

curl -sS --globoff -H 'Accept: application/json' --no-buffer \
  'https://stream.wikimedia.org/v2/stream/recentchange' \
  | clickhouse-client \
      --query 'INSERT INTO wikipedia_edits FORMAT JSONAsObject' \
      --input_format_max_block_wait_ms 1000 \
      --input_format_connection_handling 1 \
      --min_insert_block_size_rows 0 \
      --min_insert_block_size_bytes 0
```

<h2 id="input_format_max_bytes_to_read_for_schema_inference">
  input\_format\_max\_bytes\_to\_read\_for\_schema\_inference
</h2>

<SettingsInfoBlock type="UInt64" default_value="33554432" />

The maximum amount of data in bytes to read for automatic schema inference.

<h2 id="input_format_max_rows_to_read_for_schema_inference">
  input\_format\_max\_rows\_to\_read\_for\_schema\_inference
</h2>

<SettingsInfoBlock type="UInt64" default_value="25000" />

The maximum rows of data to read for automatic schema inference.

<h2 id="input_format_msgpack_number_of_columns">
  input\_format\_msgpack\_number\_of\_columns
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

The number of columns in inserted MsgPack data. Used for automatic schema inference from data.

<h2 id="input_format_mysql_dump_map_column_names">
  input\_format\_mysql\_dump\_map\_column\_names
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Match columns from table in MySQL dump and columns from ClickHouse table by names

<h2 id="input_format_mysql_dump_table_name">
  input\_format\_mysql\_dump\_table\_name
</h2>

Name of the table in MySQL dump from which to read data

<h2 id="input_format_native_allow_types_conversion">
  input\_format\_native\_allow\_types\_conversion
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.3"},{"label": "1"},{"label": "Allow types conversion in Native input forma"}]}]} />

Allow data types conversion in Native input format

<h2 id="input_format_native_decode_types_in_binary_format">
  input\_format\_native\_decode\_types\_in\_binary\_format
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "0"},{"label": "Added new setting to allow to read type names in binary format in Native output format"}]}]} />

Read data types in binary format instead of type names in Native input format

<h2 id="input_format_null_as_default">
  input\_format\_null\_as\_default
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "21.1"},{"label": "1"},{"label": "Allow to insert NULL as default for input formats by default"}]}]} />

Enables or disables the initialization of [NULL](/reference/syntax#literals) fields with [default values](/reference/statements/create/table#default_values), if data type of these fields is not [nullable](/reference/data-types/nullable).
If column type is not nullable and this setting is disabled, then inserting `NULL` causes an exception. If column type is nullable, then `NULL` values are inserted as is, regardless of this setting.

This setting is applicable for most input formats.

For complex default expressions `input_format_defaults_for_omitted_fields` must be enabled too.

Possible values:

* 0 — Inserting `NULL` into a not nullable column causes an exception.
* 1 — `NULL` fields are initialized with default column values.

<h2 id="input_format_orc_allow_missing_columns">
  input\_format\_orc\_allow\_missing\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.12"},{"label": "1"},{"label": "Allow missing columns in ORC files by default"}]}]} />

Allow missing columns while reading ORC input formats

<h2 id="input_format_orc_case_insensitive_column_matching">
  input\_format\_orc\_case\_insensitive\_column\_matching
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore case when matching ORC columns with CH columns.

<h2 id="input_format_orc_dictionary_as_low_cardinality">
  input\_format\_orc\_dictionary\_as\_low\_cardinality
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "1"},{"label": "Treat ORC dictionary encoded columns as LowCardinality columns while reading ORC files"}]}]} />

Treat ORC dictionary encoded columns as LowCardinality columns while reading ORC files.

<h2 id="input_format_orc_filter_push_down">
  input\_format\_orc\_filter\_push\_down
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

When reading ORC files, skip whole stripes or row groups based on the WHERE/PREWHERE expressions, min/max statistics or bloom filter in the ORC metadata.

<h2 id="input_format_orc_reader_time_zone_name">
  input\_format\_orc\_reader\_time\_zone\_name
</h2>

<SettingsInfoBlock type="String" default_value="GMT" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "GMT"},{"label": "The time zone name for ORC row reader, the default ORC row reader's time zone is GMT."}]}]} />

The time zone name for ORC row reader, the default ORC row reader's time zone is GMT.

<h2 id="input_format_orc_row_batch_size">
  input\_format\_orc\_row\_batch\_size
</h2>

<SettingsInfoBlock type="Int64" default_value="100000" />

Batch size when reading ORC stripes.

<h2 id="input_format_orc_skip_columns_with_unsupported_types_in_schema_inference">
  input\_format\_orc\_skip\_columns\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip columns with unsupported types while schema inference for format ORC

<h2 id="input_format_orc_use_fast_decoder">
  input\_format\_orc\_use\_fast\_decoder
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Use a faster ORC decoder implementation.

<h2 id="input_format_parallel_parsing">
  input\_format\_parallel\_parsing
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Enables or disables order-preserving parallel parsing of data formats. Supported only for [TabSeparated (TSV)](/reference/formats/TabSeparated/TabSeparated), [TSKV](/reference/formats/TabSeparated/TSKV), [CSV](/reference/formats/CSV/CSV) and [JSONEachRow](/reference/formats/JSON/JSONEachRow) formats.

Possible values:

* 1 — Enabled.
* 0 — Disabled.

<h2 id="input_format_parquet_allow_geoparquet_parser">
  input\_format\_parquet\_allow\_geoparquet\_parser
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "1"},{"label": "A new setting to use geo columns in parquet file"}]}]} />

Use geo column parser to convert Array(UInt8) into Point/Linestring/Polygon/MultiLineString/MultiPolygon types

<h2 id="input_format_parquet_allow_missing_columns">
  input\_format\_parquet\_allow\_missing\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.12"},{"label": "1"},{"label": "Allow missing columns in Parquet files by default"}]}]} />

Allow missing columns while reading Parquet input formats

<h2 id="input_format_parquet_bloom_filter_push_down">
  input\_format\_parquet\_bloom\_filter\_push\_down
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "1"},{"label": "When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and bloom filter in the Parquet metadata."}]}, {"id": "row-2","items": [{"label": "24.10"},{"label": "0"},{"label": "When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and bloom filter in the Parquet metadata."}]}]} />

When reading Parquet files, skip whole row groups based on the WHERE expressions and bloom filter in the Parquet metadata.

<h2 id="input_format_parquet_case_insensitive_column_matching">
  input\_format\_parquet\_case\_insensitive\_column\_matching
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore case when matching Parquet columns with CH columns.

<h2 id="input_format_parquet_enable_json_parsing">
  input\_format\_parquet\_enable\_json\_parsing
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.6"},{"label": "1"},{"label": "When reading Parquet files, parse JSON columns as ClickHouse JSON Column."}]}]} />

When reading Parquet files, parse JSON columns as ClickHouse JSON Column.

<h2 id="input_format_parquet_enable_row_group_prefetch">
  input\_format\_parquet\_enable\_row\_group\_prefetch
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "1"},{"label": "Enable row group prefetching during parquet parsing. Currently, only single-threaded parsing can prefetch."}]}]} />

Enable row group prefetching during parquet parsing. Currently, only single-threaded parsing can prefetch.

<h2 id="input_format_parquet_filter_push_down">
  input\_format\_parquet\_filter\_push\_down
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and min/max statistics in the Parquet metadata.

<h2 id="input_format_parquet_local_file_min_bytes_for_seek">
  input\_format\_parquet\_local\_file\_min\_bytes\_for\_seek
</h2>

<SettingsInfoBlock type="UInt64" default_value="8192" />

Min bytes required for local read (file) to do seek, instead of read with ignore in Parquet input format

<h2 id="input_format_parquet_local_time_as_utc">
  input\_format\_parquet\_local\_time\_as\_utc
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "Use more appropriate type DateTime64(..., 'UTC') for parquet 'local time without timezone' type."}]}]} />

Determines the data type used by schema inference for Parquet timestamps with isAdjustedToUTC=false. If true: DateTime64(..., 'UTC'), if false: DateTime64(...). Neither behavior is fully correct as ClickHouse doesn't have a data type for local wall-clock time. Counterintuitively, 'true' is probably the less incorrect option, because formatting the 'UTC' timestamp as String will produce representation of the correct local time.

<h2 id="input_format_parquet_max_block_size">
  input\_format\_parquet\_max\_block\_size
</h2>

<SettingsInfoBlock type="NonZeroUInt64" default_value="65409" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "65409"},{"label": "Increase block size for parquet reader."}]}]} />

Max block size for parquet reader.

<h2 id="input_format_parquet_memory_high_watermark">
  input\_format\_parquet\_memory\_high\_watermark
</h2>

<SettingsInfoBlock type="UInt64" default_value="4294967296" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "4294967296"},{"label": "New setting"}]}]} />

Approximate memory limit for Parquet reader v3. Limits how many row groups or columns can be read in parallel. When reading multiple files in one query, the limit is on total memory usage across those files.

<h2 id="input_format_parquet_memory_low_watermark">
  input\_format\_parquet\_memory\_low\_watermark
</h2>

<SettingsInfoBlock type="UInt64" default_value="2097152" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "2097152"},{"label": "New setting"}]}]} />

Schedule prefetches more aggressively if memory usage is below than threshold. Potentially useful e.g. if there are many small bloom filters to read over network.

<h2 id="input_format_parquet_page_filter_push_down">
  input\_format\_parquet\_page\_filter\_push\_down
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "New setting (no effect when input_format_parquet_use_native_reader_v3 is disabled)"}]}]} />

Skip pages using min/max values from column index.

<h2 id="input_format_parquet_prefer_block_bytes">
  input\_format\_parquet\_prefer\_block\_bytes
</h2>

<SettingsInfoBlock type="UInt64" default_value="16744704" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "16744704"},{"label": "Average block bytes output by parquet reader."}]}]} />

Average block bytes output by parquet reader

<h2 id="input_format_parquet_preserve_order">
  input\_format\_parquet\_preserve\_order
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.5"},{"label": "0"},{"label": "Allow Parquet reader to reorder rows for better parallelism."}]}]} />

Avoid reordering rows when reading from Parquet files. Not recommended as row ordering is generally not guaranteed, and other parts of query pipeline may break it. Use `ORDER BY _row_number` instead.

<h2 id="input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference">
  input\_format\_parquet\_skip\_columns\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip columns with unsupported types while schema inference for format Parquet

<h2 id="input_format_parquet_use_offset_index">
  input\_format\_parquet\_use\_offset\_index
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "New setting (no effect when input_format_parquet_use_native_reader_v3 is disabled)"}]}]} />

Minor tweak to how pages are read from parquet file when no page filtering is used.

<h2 id="input_format_parquet_verify_checksums">
  input\_format\_parquet\_verify\_checksums
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "New setting."}]}]} />

Verify page checksums when reading parquet files.

<h2 id="input_format_protobuf_flatten_google_wrappers">
  input\_format\_protobuf\_flatten\_google\_wrappers
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enable Google wrappers for regular non-nested columns, e.g. google.protobuf.StringValue 'str' for String column 'str'. For Nullable columns empty wrappers are recognized as defaults, and missing as nulls

<h2 id="input_format_protobuf_oneof_presence">
  input\_format\_protobuf\_oneof\_presence
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.9"},{"label": "0"},{"label": "New setting"}]}]} />

Indicate which field of protobuf oneof was found by means of setting enum value in a special colum

<h2 id="input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference">
  input\_format\_protobuf\_skip\_fields\_with\_unsupported\_types\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip fields with unsupported types while schema inference for format Protobuf

<h2 id="input_format_record_errors_file_path">
  input\_format\_record\_errors\_file\_path
</h2>

Path of the file used to record errors while reading text formats (CSV, TSV).

<h2 id="input_format_skip_unknown_fields">
  input\_format\_skip\_unknown\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.6"},{"label": "1"},{"label": "Optimize reading subset of columns for some input formats"}]}]} />

Enables or disables skipping insertion of extra data.

When writing data, ClickHouse throws an exception if input data contain columns that do not exist in the target table. If skipping is enabled, ClickHouse does not insert extra data and does not throw an exception.

Supported formats:

* [JSONEachRow](/reference/formats/JSON/JSONEachRow) (and other JSON formats)
* [BSONEachRow](/reference/formats/BSONEachRow) (and other JSON formats)
* [TSKV](/reference/formats/TabSeparated/TSKV)
* All formats with suffixes WithNames/WithNamesAndTypes
* [MySQLDump](/reference/formats/MySQLDump)
* [Native](/reference/formats/Native)

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="input_format_try_infer_dates">
  input\_format\_try\_infer\_dates
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

If enabled, ClickHouse will try to infer type `Date` from string fields in schema inference for text formats. If all fields from a column in input data were successfully parsed as dates, the result type will be `Date`, if at least one field was not parsed as date, the result type will be `String`.

Enabled by default.

<h2 id="input_format_try_infer_datetimes">
  input\_format\_try\_infer\_datetimes
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

If enabled, ClickHouse will try to infer type `DateTime64` from string fields in schema inference for text formats. If all fields from a column in input data were successfully parsed as datetimes, the result type will be `DateTime64`, if at least one field was not parsed as datetime, the result type will be `String`.

Enabled by default.

<h2 id="input_format_try_infer_datetimes_only_datetime64">
  input\_format\_try\_infer\_datetimes\_only\_datetime64
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.8"},{"label": "0"},{"label": "Allow to infer DateTime instead of DateTime64 in data formats"}]}]} />

When input\_format\_try\_infer\_datetimes is enabled, infer only DateTime64 but not DateTime types

<h2 id="input_format_try_infer_exponent_floats">
  input\_format\_try\_infer\_exponent\_floats
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "0"},{"label": "Don't infer floats in exponential notation by default"}]}]} />

Try to infer floats in exponential notation while schema inference in text formats (except JSON, where exponent numbers are always inferred)

<h2 id="input_format_try_infer_integers">
  input\_format\_try\_infer\_integers
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

If enabled, ClickHouse will try to infer integers instead of floats in schema inference for text formats. If all numbers in the column from input data are integers, the result type will be `Int64`, if at least one number is float, the result type will be `Float64`.

Enabled by default.

<h2 id="input_format_try_infer_variants">
  input\_format\_try\_infer\_variants
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.9"},{"label": "0"},{"label": "Try to infer Variant type in text formats when there is more than one possible type for column/array elements"}]}]} />

If enabled, ClickHouse will try to infer type [`Variant`](/reference/data-types/variant) in schema inference for text formats when there is more than one possible type for column/array elements.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="input_format_tsv_allow_variable_number_of_columns">
  input\_format\_tsv\_allow\_variable\_number\_of\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Ignore extra columns in TSV input (if file has more columns than expected) and treat missing fields in TSV input as default values

<h2 id="input_format_tsv_crlf_end_of_line">
  input\_format\_tsv\_crlf\_end\_of\_line
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.5"},{"label": "0"},{"label": "Enables reading of CRLF line endings with TSV formats"}]}]} />

If it is set true, file function will read TSV format with \r\n instead of \n.

<h2 id="input_format_tsv_detect_header">
  input\_format\_tsv\_detect\_header
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.1"},{"label": "1"},{"label": "Detect header in TSV format by default"}]}]} />

Automatically detect header with names and types in TSV format

<h2 id="input_format_tsv_empty_as_default">
  input\_format\_tsv\_empty\_as\_default
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Treat empty fields in TSV input as default values.

<h2 id="input_format_tsv_enum_as_number">
  input\_format\_tsv\_enum\_as\_number
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Treat inserted enum values in TSV formats as enum indices.

<h2 id="input_format_tsv_skip_first_lines">
  input\_format\_tsv\_skip\_first\_lines
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

Skip specified number of lines at the beginning of data in TSV format

<h2 id="input_format_tsv_skip_trailing_empty_lines">
  input\_format\_tsv\_skip\_trailing\_empty\_lines
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip trailing empty lines in TSV format

<h2 id="input_format_tsv_use_best_effort_in_schema_inference">
  input\_format\_tsv\_use\_best\_effort\_in\_schema\_inference
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Use some tweaks and heuristics to infer schema in TSV format

<h2 id="input_format_values_accurate_types_of_literals">
  input\_format\_values\_accurate\_types\_of\_literals
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

For Values format: when parsing and interpreting expressions using template, check actual type of literal to avoid possible overflow and precision issues.

<h2 id="input_format_values_deduce_templates_of_expressions">
  input\_format\_values\_deduce\_templates\_of\_expressions
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

For Values format: if the field could not be parsed by streaming parser, run SQL parser, deduce template of the SQL expression, try to parse all rows using template and then interpret expression for all rows.

<h2 id="input_format_values_interpret_expressions">
  input\_format\_values\_interpret\_expressions
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

For Values format: if the field could not be parsed by streaming parser, run SQL parser and try to interpret it as SQL expression.

<h2 id="input_format_with_names_use_header">
  input\_format\_with\_names\_use\_header
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "20.5"},{"label": "1"},{"label": "Enable using header with names for formats with WithNames/WithNamesAndTypes suffixes"}]}]} />

Enables or disables checking the column order when inserting data.

To improve insert performance, we recommend disabling this check if you are sure that the column order of the input data is the same as in the target table.

Supported formats:

* [CSVWithNames](/reference/formats/CSV/CSVWithNames)
* [CSVWithNamesAndTypes](/reference/formats/CSV/CSVWithNamesAndTypes)
* [TabSeparatedWithNames](/reference/formats/TabSeparated/TabSeparatedWithNames)
* [TabSeparatedWithNamesAndTypes](/reference/formats/TabSeparated/TabSeparatedWithNamesAndTypes)
* [JSONCompactEachRowWithNames](/reference/formats/JSON/JSONCompactEachRowWithNames)
* [JSONCompactEachRowWithNamesAndTypes](/reference/formats/JSON/JSONCompactEachRowWithNamesAndTypes)
* [JSONCompactStringsEachRowWithNames](/reference/formats/JSON/JSONCompactStringsEachRowWithNames)
* [JSONCompactStringsEachRowWithNamesAndTypes](/reference/formats/JSON/JSONCompactStringsEachRowWithNamesAndTypes)
* [RowBinaryWithNames](/reference/formats/RowBinary/RowBinaryWithNames)
* [RowBinaryWithNamesAndTypes](/reference/formats/RowBinary/RowBinaryWithNamesAndTypes)
* [CustomSeparatedWithNames](/reference/formats/CustomSeparated/CustomSeparatedWithNames)
* [CustomSeparatedWithNamesAndTypes](/reference/formats/CustomSeparated/CustomSeparatedWithNamesAndTypes)

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="input_format_with_types_use_header">
  input\_format\_with\_types\_use\_header
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Controls whether format parser should check if data types from the input data match data types from the target table.

Supported formats:

* [CSVWithNamesAndTypes](/reference/formats/CSV/CSVWithNamesAndTypes)
* [TabSeparatedWithNamesAndTypes](/reference/formats/TabSeparated/TabSeparatedWithNamesAndTypes)
* [JSONCompactEachRowWithNamesAndTypes](/reference/formats/JSON/JSONCompactEachRowWithNamesAndTypes)
* [JSONCompactStringsEachRowWithNamesAndTypes](/reference/formats/JSON/JSONCompactStringsEachRowWithNamesAndTypes)
* [RowBinaryWithNamesAndTypes](/reference/formats/RowBinary/RowBinaryWithNamesAndTypes)
* [CustomSeparatedWithNamesAndTypes](/reference/formats/CustomSeparated/CustomSeparatedWithNamesAndTypes)

Possible values:

* 0 — Disabled.
* 1 — Enabled.

<h2 id="insert_distributed_one_random_shard">
  insert\_distributed\_one\_random\_shard
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enables or disables random shard insertion into a [Distributed](/reference/engines/table-engines/special/distributed) table when there is no distributed key.

By default, when inserting data into a `Distributed` table with more than one shard, the ClickHouse server will reject any insertion request if there is no distributed key. When `insert_distributed_one_random_shard = 1`, insertions are allowed and data is forwarded randomly among all shards.

Possible values:

* 0 — Insertion is rejected if there are multiple shards and no distributed key is given.
* 1 — Insertion is done randomly among all available shards when no distributed key is given.

<h2 id="interval_output_format">
  interval\_output\_format
</h2>

<SettingsInfoBlock type="IntervalOutputFormat" default_value="numeric" />

Allows choosing different output formats of the text representation of interval types.

Possible values:

* `kusto` - KQL-style output format.

  ClickHouse outputs intervals in [KQL format](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings#the-constant-c-format-specifier). For example, `toIntervalDay(2)` would be formatted as `2.00:00:00`. Please note that for interval types of varying length (ie. `IntervalMonth` and `IntervalYear`) the average number of seconds per interval is taken into account.

* `numeric` - Numeric output format.

  ClickHouse outputs intervals as their underlying numeric representation. For example, `toIntervalDay(2)` would be formatted as `2`.

See also:

* [Interval](/reference/data-types/special-data-types/interval)

<h2 id="into_outfile_create_parent_directories">
  into\_outfile\_create\_parent\_directories
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Automatically create parent directories when using INTO OUTFILE if they do not already exists.

<h2 id="json_type_escape_dots_in_keys">
  json\_type\_escape\_dots\_in\_keys
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When enabled, dots in JSON keys will be escaped during parsing.

<h2 id="max_dynamic_subcolumns_in_json_type_parsing">
  max\_dynamic\_subcolumns\_in\_json\_type\_parsing
</h2>

<SettingsInfoBlock type="UInt64Auto" default_value="auto" />

The maximum number of dynamic subcolumns that can be created in every column during parsing of JSON column.
It allows to control the number of dynamic subcolumns during parsing regardless of dynamic parameters specified in the data type.

<h2 id="output_format_arrow_compression_method">
  output\_format\_arrow\_compression\_method
</h2>

<SettingsInfoBlock type="ArrowCompression" default_value="lz4_frame" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.3"},{"label": "lz4_frame"},{"label": "Use lz4 compression in Arrow output format by default"}]}]} />

Compression method for Arrow output format. Supported codecs: lz4\_frame, zstd, none (uncompressed)

<h2 id="output_format_arrow_date_as_uint16">
  output\_format\_arrow\_date\_as\_uint16
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.2"},{"label": "0"},{"label": "Write Date as Arrow DATE32 instead of plain UInt16 by default."}]}]} />

Write Date values as plain 16-bit numbers (read back as UInt16), instead of converting to a 32-bit Arrow DATE32 type (read back as Date32).

<h2 id="output_format_arrow_fixed_string_as_fixed_byte_array">
  output\_format\_arrow\_fixed\_string\_as\_fixed\_byte\_array
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.2"},{"label": "1"},{"label": "Use Arrow FIXED_SIZE_BINARY type for FixedString by default"}]}]} />

Use Arrow FIXED\_SIZE\_BINARY type instead of Binary for FixedString columns.

<h2 id="output_format_arrow_low_cardinality_as_dictionary">
  output\_format\_arrow\_low\_cardinality\_as\_dictionary
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enable output LowCardinality type as Dictionary Arrow type

<h2 id="output_format_arrow_string_as_string">
  output\_format\_arrow\_string\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "ClickHouse allows arbitrary binary data in the String data type, which is typically UTF-8. Parquet/ORC/Arrow Strings only support UTF-8. That's why you can choose which Arrow's data type to use for the ClickHouse String data type - String or Binary. While Binary would be more correct and compatible, using String by default will correspond to user expectations in most cases."}]}]} />

Use Arrow String type instead of Binary for String columns

<h2 id="output_format_arrow_unsupported_types_as_binary">
  output\_format\_arrow\_unsupported\_types\_as\_binary
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.4"},{"label": "1"},{"label": "New setting to convert unsupported CH types to arrow binary instead of UNKNOWN_TYPE exception."}]}]} />

Output types having no conversion as raw binary data. If false - such types would raise UNKNOWN\_TYPE exception.

<h2 id="output_format_arrow_use_64_bit_indexes_for_dictionary">
  output\_format\_arrow\_use\_64\_bit\_indexes\_for\_dictionary
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "0"},{"label": "Allow to use 64 bit indexes type in Arrow dictionaries"}]}, {"id": "row-2","items": [{"label": "24.1"},{"label": "0"},{"label": "Allow to use 64 bit indexes type in Arrow dictionaries"}]}]} />

Always use 64 bit integers for dictionary indexes in Arrow format

<h2 id="output_format_arrow_use_signed_indexes_for_dictionary">
  output\_format\_arrow\_use\_signed\_indexes\_for\_dictionary
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "1"},{"label": "Use signed indexes type for Arrow dictionaries by default as it's recommended"}]}]} />

Use signed integers for dictionary indexes in Arrow format

<h2 id="output_format_avro_codec">
  output\_format\_avro\_codec
</h2>

Compression codec used for output. Possible values: 'null', 'deflate', 'snappy', 'zstd'.

<h2 id="output_format_avro_confluent_subject">
  output\_format\_avro\_confluent\_subject
</h2>

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.5"},{"label": ""},{"label": "New setting to specify the subject name for schema registration in Confluent Schema Registry when writing AvroConfluent output."}]}]} />

For AvroConfluent output format: the subject name under which the schema is registered in the Confluent Schema Registry. Required when writing AvroConfluent output.

<h2 id="output_format_avro_rows_in_file">
  output\_format\_avro\_rows\_in\_file
</h2>

<SettingsInfoBlock type="UInt64" default_value="1" />

Max rows in a file (if permitted by storage)

<h2 id="output_format_avro_string_column_pattern">
  output\_format\_avro\_string\_column\_pattern
</h2>

For Avro format: regexp of String columns to select as AVRO string.

<h2 id="output_format_avro_sync_interval">
  output\_format\_avro\_sync\_interval
</h2>

<SettingsInfoBlock type="UInt64" default_value="16384" />

Sync interval in bytes.

<h2 id="output_format_binary_encode_types_in_binary_format">
  output\_format\_binary\_encode\_types\_in\_binary\_format
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "0"},{"label": "Added new setting to allow to write type names in binary format in RowBinaryWithNamesAndTypes output format"}]}]} />

Write data types in binary format instead of type names in RowBinaryWithNamesAndTypes output format

<h2 id="output_format_binary_write_json_as_string">
  output\_format\_binary\_write\_json\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "0"},{"label": "Add new setting to write values of JSON type as JSON string in RowBinary output format"}]}]} />

Write values of [JSON](/reference/data-types/newjson) data type as JSON [String](/reference/data-types/string) values in RowBinary output format.

<h2 id="output_format_bson_string_as_string">
  output\_format\_bson\_string\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Use BSON String type instead of Binary for String columns.

<h2 id="output_format_compression_level">
  output\_format\_compression\_level
</h2>

<SettingsInfoBlock type="UInt64" default_value="3" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "3"},{"label": "Allow to change compression level in the query output"}]}]} />

Default compression level if query output is compressed. The setting is applied when `SELECT` query has `INTO OUTFILE` or when writing to table functions `file`, `url`, `hdfs`, `s3`, or `azureBlobStorage`.

Possible values: from `1` to `22`

<h2 id="output_format_compression_zstd_window_log">
  output\_format\_compression\_zstd\_window\_log
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "0"},{"label": "Allow to change zstd window log in the query output when zstd compression is used"}]}]} />

Can be used when the output compression method is `zstd`. If greater than `0`, this setting explicitly sets compression window size (power of `2`) and enables a long-range mode for zstd compression. This can help to achieve a better compression ratio.

Possible values: non-negative numbers. Note that if the value is too small or too big, `zstdlib` will throw an exception. Typical values are from `20` (window size = `1MB`) to `30` (window size = `1GB`).

<h2 id="output_format_csv_crlf_end_of_line">
  output\_format\_csv\_crlf\_end\_of\_line
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

If it is set true, end of line in CSV format will be \r\n instead of \n.

<h2 id="output_format_csv_serialize_tuple_into_separate_columns">
  output\_format\_csv\_serialize\_tuple\_into\_separate\_columns
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}, {"id": "row-2","items": [{"label": "24.3"},{"label": "1"},{"label": "A new way of how interpret tuples in CSV format was added."}]}]} />

If it set to true, then Tuples in CSV format are serialized as separate columns (that is, their nesting in the tuple is lost)

<h2 id="output_format_decimal_trailing_zeros">
  output\_format\_decimal\_trailing\_zeros
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "21.9"},{"label": "0"},{"label": "Do not output trailing zeros in text representation of Decimal types by default for better looking output"}]}]} />

Output trailing zeros when printing Decimal values. E.g. 1.230000 instead of 1.23.

Disabled by default.

<h2 id="output_format_json_array_of_rows">
  output\_format\_json\_array\_of\_rows
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enables the ability to output all rows as a JSON array in the [JSONEachRow](/reference/formats/JSON/JSONEachRow) format.

Possible values:

* 1 — ClickHouse outputs all rows as an array, each row in the `JSONEachRow` format.
* 0 — ClickHouse outputs each row separately in the `JSONEachRow` format.

**Example of a query with the enabled setting**

Query:

```sql theme={null}
SET output_format_json_array_of_rows = 1;
SELECT number FROM numbers(3) FORMAT JSONEachRow;
```

Result:

```text theme={null}
[
{"number":"0"},
{"number":"1"},
{"number":"2"}
]
```

**Example of a query with the disabled setting**

Query:

```sql theme={null}
SET output_format_json_array_of_rows = 0;
SELECT number FROM numbers(3) FORMAT JSONEachRow;
```

Result:

```text theme={null}
{"number":"0"}
{"number":"1"}
{"number":"2"}
```

<h2 id="output_format_json_escape_forward_slashes">
  output\_format\_json\_escape\_forward\_slashes
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Controls escaping forward slashes for string outputs in JSON output format. This is intended for compatibility with JavaScript. Don't confuse with backslashes that are always escaped.

Enabled by default.

<h2 id="output_format_json_map_as_array_of_tuples">
  output\_format\_json\_map\_as\_array\_of\_tuples
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.7"},{"label": "0"},{"label": "New setting"}]}]} />

Serialize maps columns as JSON arrays of tuples.

Disabled by default.

<h2 id="output_format_json_named_tuples_as_objects">
  output\_format\_json\_named\_tuples\_as\_objects
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "22.6"},{"label": "1"},{"label": "Allow to serialize named tuples as JSON objects in JSON formats by default"}]}]} />

Serialize named tuple columns as JSON objects.

Enabled by default.

<h2 id="output_format_json_pretty_print">
  output\_format\_json\_pretty\_print
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "Print values in a pretty format in JSON output format by default"}]}]} />

This setting determines how nested structures such as Tuples, Maps, and Arrays are displayed within the `data` array when using the JSON output format.

For example, instead of output:

```json theme={null}
"data":
[
  {
    "tuple": {"a":1,"b":2,"c":3},
    "array": [1,2,3],
    "map": {"a":1,"b":2,"c":3}
  }
],
```

The output will be formatted as:

```json theme={null}
"data":
[
    {
        "tuple": {
            "a": 1,
            "b": 2,
            "c": 3
        },
        "array": [
            1,
            2,
            3
        ],
        "map": {
            "a": 1,
            "b": 2,
            "c": 3
        }
    }
],
```

Enabled by default.

<h2 id="output_format_json_quote_64bit_floats">
  output\_format\_json\_quote\_64bit\_floats
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Controls quoting of 64-bit [floats](/reference/data-types/float) when they are output in JSON\* formats.

Disabled by default.

<h2 id="output_format_json_quote_64bit_integers">
  output\_format\_json\_quote\_64bit\_integers
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "0"},{"label": "Disable quoting of the 64 bit integers in JSON by default"}]}]} />

Controls quoting of 64-bit or bigger [integers](/reference/data-types/int-uint) (like `UInt64` or `Int128`) when they are output in a [JSON](/reference/formats/JSON/JSON) format.
Such integers are enclosed in quotes by default. This behavior is compatible with most JavaScript implementations.

Possible values:

* 0 — Integers are output without quotes.
* 1 — Integers are enclosed in quotes.

<h2 id="output_format_json_quote_decimals">
  output\_format\_json\_quote\_decimals
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Controls quoting of decimals in JSON output formats.

Disabled by default.

<h2 id="output_format_json_quote_denormals">
  output\_format\_json\_quote\_denormals
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Enables `+nan`, `-nan`, `+inf`, `-inf` outputs in [JSON](/reference/formats/JSON/JSON) output format.

Possible values:

* 0 — Disabled.
* 1 — Enabled.

**Example**

Consider the following table `account_orders`:

```text theme={null}
┌─id─┬─name───┬─duration─┬─period─┬─area─┐
│  1 │ Andrew │       20 │      0 │  400 │
│  2 │ John   │       40 │      0 │    0 │
│  3 │ Bob    │       15 │      0 │ -100 │
└────┴────────┴──────────┴────────┴──────┘
```

When `output_format_json_quote_denormals = 0`, the query returns `null` values in output:

```sql theme={null}
SELECT area/period FROM account_orders FORMAT JSON;
```

```json theme={null}
{
        "meta":
        [
                {
                        "name": "divide(area, period)",
                        "type": "Float64"
                }
        ],

        "data":
        [
                {
                        "divide(area, period)": null
                },
                {
                        "divide(area, period)": null
                },
                {
                        "divide(area, period)": null
                }
        ],

        "rows": 3,

        "statistics":
        {
                "elapsed": 0.003648093,
                "rows_read": 3,
                "bytes_read": 24
        }
}
```

When `output_format_json_quote_denormals = 1`, the query returns:

```json theme={null}
{
        "meta":
        [
                {
                        "name": "divide(area, period)",
                        "type": "Float64"
                }
        ],

        "data":
        [
                {
                        "divide(area, period)": "inf"
                },
                {
                        "divide(area, period)": "-nan"
                },
                {
                        "divide(area, period)": "-inf"
                }
        ],

        "rows": 3,

        "statistics":
        {
                "elapsed": 0.000070241,
                "rows_read": 3,
                "bytes_read": 24
        }
}
```

<h2 id="output_format_json_skip_null_value_in_named_tuples">
  output\_format\_json\_skip\_null\_value\_in\_named\_tuples
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Skip key value pairs with null value when serialize named tuple columns as JSON objects. It is only valid when output\_format\_json\_named\_tuples\_as\_objects is true.

<h2 id="output_format_json_validate_utf8">
  output\_format\_json\_validate\_utf8
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Controls validation of UTF-8 sequences in JSON output formats, doesn't impact formats JSON/JSONCompact/JSONColumnsWithMetadata, they always validate UTF-8.

Disabled by default.

<h2 id="output_format_markdown_escape_special_characters">
  output\_format\_markdown\_escape\_special\_characters
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When enabled, escape special characters in Markdown.

[Common Mark](https://spec.commonmark.org/0.30/#example-12) defines the following special characters that can be escaped by :

```
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
```

Possible values:

* 0 — Disable.
* 1 — Enable.

<h2 id="output_format_msgpack_uuid_representation">
  output\_format\_msgpack\_uuid\_representation
</h2>

<SettingsInfoBlock type="MsgPackUUIDRepresentation" default_value="ext" />

The way how to output UUID in MsgPack format.

<h2 id="output_format_native_encode_types_in_binary_format">
  output\_format\_native\_encode\_types\_in\_binary\_format
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "0"},{"label": "Added new setting to allow to write type names in binary format in Native output format"}]}]} />

Write data types in binary format instead of type names in Native output format

<h2 id="output_format_native_use_flattened_dynamic_and_json_serialization">
  output\_format\_native\_use\_flattened\_dynamic\_and\_json\_serialization
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.6"},{"label": "0"},{"label": "Add flattened Dynamic/JSON serializations to Native format"}]}]} />

Write data of [JSON](/reference/data-types/newjson) and [Dynamic](/reference/data-types/dynamic) columns in a flattened format (all types/paths as separate subcolumns).

<h2 id="output_format_native_write_json_as_string">
  output\_format\_native\_write\_json\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.10"},{"label": "0"},{"label": "Add new setting to allow write JSON column as single String column in Native format"}]}]} />

Write data of [JSON](/reference/data-types/newjson) column as [String](/reference/data-types/string) column containing JSON strings instead of default native JSON serialization.

<h2 id="output_format_orc_compression_block_size">
  output\_format\_orc\_compression\_block\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="262144" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "262144"},{"label": "New setting"}]}]} />

The size of the compression block in bytes for ORC output format.

<h2 id="output_format_orc_compression_method">
  output\_format\_orc\_compression\_method
</h2>

<SettingsInfoBlock type="ORCCompression" default_value="zstd" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "zstd"},{"label": "Parquet/ORC/Arrow support many compression methods, including lz4 and zstd. ClickHouse supports each and every compression method. Some inferior tools, such as 'duckdb', lack support for the faster `lz4` compression method, that's why we set zstd by default."}]}, {"id": "row-2","items": [{"label": "23.3"},{"label": "lz4_frame"},{"label": "Use lz4 compression in ORC output format by default"}]}]} />

Compression method for ORC output format. Supported codecs: lz4, snappy, zlib, zstd, none (uncompressed)

<h2 id="output_format_orc_dictionary_key_size_threshold">
  output\_format\_orc\_dictionary\_key\_size\_threshold
</h2>

<SettingsInfoBlock type="Double" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.9"},{"label": "0"},{"label": "For a string column in ORC output format, if the number of distinct values is greater than this fraction of the total number of non-null rows, turn off dictionary encoding. Otherwise dictionary encoding is enabled"}]}]} />

For a string column in ORC output format, if the number of distinct values is greater than this fraction of the total number of non-null rows, turn off dictionary encoding. Otherwise dictionary encoding is enabled

<h2 id="output_format_orc_row_index_stride">
  output\_format\_orc\_row\_index\_stride
</h2>

<SettingsInfoBlock type="UInt64" default_value="10000" />

Target row index stride in ORC output format

<h2 id="output_format_orc_string_as_string">
  output\_format\_orc\_string\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "ClickHouse allows arbitrary binary data in the String data type, which is typically UTF-8. Parquet/ORC/Arrow Strings only support UTF-8. That's why you can choose which Arrow's data type to use for the ClickHouse String data type - String or Binary. While Binary would be more correct and compatible, using String by default will correspond to user expectations in most cases."}]}]} />

Use ORC String type instead of Binary for String columns

<h2 id="output_format_orc_writer_time_zone_name">
  output\_format\_orc\_writer\_time\_zone\_name
</h2>

<SettingsInfoBlock type="String" default_value="GMT" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "GMT"},{"label": "The time zone name for ORC writer, the default ORC writer's time zone is GMT."}]}]} />

The time zone name for ORC writer, the default ORC writer's time zone is GMT.

<h2 id="output_format_parallel_formatting">
  output\_format\_parallel\_formatting
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Enables or disables parallel formatting of data formats. Supported only for [TSV](/reference/formats/TabSeparated/TabSeparated), [TSKV](/reference/formats/TabSeparated/TSKV), [CSV](/reference/formats/CSV/CSV) and [JSONEachRow](/reference/formats/JSON/JSONEachRow) formats.

Possible values:

* 1 — Enabled.
* 0 — Disabled.

<h2 id="output_format_parquet_batch_size">
  output\_format\_parquet\_batch\_size
</h2>

<SettingsInfoBlock type="NonZeroUInt64" default_value="1024" />

Check page size every this many rows. Consider decreasing if you have columns with average values size above a few KBs.

<h2 id="output_format_parquet_bloom_filter_bits_per_value">
  output\_format\_parquet\_bloom\_filter\_bits\_per\_value
</h2>

<SettingsInfoBlock type="Double" default_value="10.5" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.2"},{"label": "10.5"},{"label": "New setting."}]}]} />

Approximate number of bits to use for each distinct value in parquet bloom filters. Estimated false positive rates:

* 6   bits - 10%
* 10.5 bits -  1%
* 16.9 bits -  0.1%
* 26.4 bits -  0.01%
* 41   bits -  0.001%

<h2 id="output_format_parquet_bloom_filter_flush_threshold_bytes">
  output\_format\_parquet\_bloom\_filter\_flush\_threshold\_bytes
</h2>

<SettingsInfoBlock type="UInt64" default_value="134217728" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.2"},{"label": "134217728"},{"label": "New setting."}]}]} />

Where in the parquet file to place the bloom filters. Bloom filters will be written in groups of approximately this size. In particular:

* if 0, each row group's bloom filters are written immediately after the row group,
* if greater than the total size of all bloom filters, bloom filters for all row groups will be accumulated in memory, then written together near the end of the file,
* otherwise, bloom filters will be accumulated in memory and written out whenever their total size goes above this value.

<h2 id="output_format_parquet_compression_method">
  output\_format\_parquet\_compression\_method
</h2>

<SettingsInfoBlock type="ParquetCompression" default_value="zstd" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "zstd"},{"label": "Parquet/ORC/Arrow support many compression methods, including lz4 and zstd. ClickHouse supports each and every compression method. Some inferior tools, such as 'duckdb', lack support for the faster `lz4` compression method, that's why we set zstd by default."}]}, {"id": "row-2","items": [{"label": "23.3"},{"label": "lz4"},{"label": "Use lz4 compression in Parquet output format by default"}]}]} />

Compression method for Parquet output format. Supported codecs: snappy, lz4, brotli, zstd, gzip, none (uncompressed)

<h2 id="output_format_parquet_data_page_size">
  output\_format\_parquet\_data\_page\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1048576" />

Target page size in bytes, before compression.

<h2 id="output_format_parquet_date_as_uint16">
  output\_format\_parquet\_date\_as\_uint16
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "0"},{"label": "Added a compatibility setting for a minor compatibility-breaking change introduced back in 24.12."}]}, {"id": "row-2","items": [{"label": "24.12"},{"label": "0"},{"label": "Write Date as Date32 instead of plain UInt16 (these are the two Parquet types closest to Date)."}]}]} />

Write Date values as plain 16-bit numbers (read back as UInt16), instead of converting to a 32-bit parquet DATE type (read back as Date32).

<h2 id="output_format_parquet_datetime_as_uint32">
  output\_format\_parquet\_datetime\_as\_uint32
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.12"},{"label": "0"},{"label": "Write DateTime as DateTime64(3) instead of UInt32 (these are the two Parquet types closest to DateTime)."}]}]} />

Write DateTime values as raw unix timestamp (read back as UInt32), instead of converting to milliseconds (read back as DateTime64(3)).

<h2 id="output_format_parquet_enum_as_byte_array">
  output\_format\_parquet\_enum\_as\_byte\_array
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1"},{"label": "Enable writing Enum as byte array in Parquet by default"}]}, {"id": "row-2","items": [{"label": "25.7"},{"label": "0"},{"label": "Write enum using parquet physical type: BYTE_ARRAY and logical type: ENUM"}]}]} />

Write enum using parquet physical type: BYTE\_ARRAY and logical type: ENUM

<h2 id="output_format_parquet_fixed_string_as_fixed_byte_array">
  output\_format\_parquet\_fixed\_string\_as\_fixed\_byte\_array
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "23.2"},{"label": "1"},{"label": "Use Parquet FIXED_LENGTH_BYTE_ARRAY type for FixedString by default"}]}]} />

Use Parquet FIXED\_LEN\_BYTE\_ARRAY type instead of Binary for FixedString columns.

<h2 id="output_format_parquet_geometadata">
  output\_format\_parquet\_geometadata
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.7"},{"label": "1"},{"label": "A new setting to allow to write information about geo columns in parquet metadata and encode columns in WKB format."}]}]} />

Allow to write information about geo columns in parquet metadata and encode columns in WKB format.

<h2 id="output_format_parquet_max_dictionary_size">
  output\_format\_parquet\_max\_dictionary\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1048576" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.8"},{"label": "1048576"},{"label": "New setting"}]}]} />

If dictionary size grows bigger than this many bytes, switch to encoding without dictionary. Set to 0 to disable dictionary encoding.

<h2 id="output_format_parquet_parallel_encoding">
  output\_format\_parquet\_parallel\_encoding
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Do Parquet encoding in multiple threads.

<h2 id="output_format_parquet_row_group_size">
  output\_format\_parquet\_row\_group\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000000" />

Target row group size in rows.

<h2 id="output_format_parquet_row_group_size_bytes">
  output\_format\_parquet\_row\_group\_size\_bytes
</h2>

<SettingsInfoBlock type="UInt64" default_value="536870912" />

Target row group size in bytes, before compression.

<h2 id="output_format_parquet_string_as_string">
  output\_format\_parquet\_string\_as\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "ClickHouse allows arbitrary binary data in the String data type, which is typically UTF-8. Parquet/ORC/Arrow Strings only support UTF-8. That's why you can choose which Arrow's data type to use for the ClickHouse String data type - String or Binary. While Binary would be more correct and compatible, using String by default will correspond to user expectations in most cases."}]}]} />

Use Parquet String type instead of Binary for String columns.

<h2 id="output_format_parquet_write_bloom_filter">
  output\_format\_parquet\_write\_bloom\_filter
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.2"},{"label": "1"},{"label": "Added support for writing Parquet bloom filters."}]}]} />

Write bloom filters in parquet files.

<h2 id="output_format_parquet_write_checksums">
  output\_format\_parquet\_write\_checksums
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.11"},{"label": "1"},{"label": "New setting."}]}]} />

Put crc32 checksums in parquet page headers.

<h2 id="output_format_parquet_write_page_index">
  output\_format\_parquet\_write\_page\_index
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.7"},{"label": "1"},{"label": "Add a possibility to write page index into parquet files."}]}]} />

Write column index and offset index (i.e. statistics about each data page, which may be used for filter pushdown on read) into parquet files.

<h2 id="output_format_pretty_color">
  output\_format\_pretty\_color
</h2>

<SettingsInfoBlock type="UInt64Auto" default_value="auto" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.1"},{"label": "auto"},{"label": "Setting is changed to allow also for auto value, disabling ANSI escapes if output is not a tty"}]}]} />

Use ANSI escape sequences in Pretty formats. 0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.

<h2 id="output_format_pretty_display_footer_column_names">
  output\_format\_pretty\_display\_footer\_column\_names
</h2>

<SettingsInfoBlock type="UInt64" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "1"},{"label": "Add a setting to display column names in the footer if there are many rows. Threshold value is controlled by output_format_pretty_display_footer_column_names_min_rows."}]}]} />

Display column names in the footer if there are many table rows.

Possible values:

* 0 — No column names are displayed in the footer.
* 1 — Column names are displayed in the footer if row count is greater than or equal to the threshold value set by [output\_format\_pretty\_display\_footer\_column\_names\_min\_rows](#output_format_pretty_display_footer_column_names_min_rows) (50 by default).

**Example**

Query:

```sql theme={null}
SELECT *, toTypeName(*) FROM (SELECT * FROM system.numbers LIMIT 1000);
```

Result:

```response theme={null}
      ┌─number─┬─toTypeName(number)─┐
   1. │      0 │ UInt64             │
   2. │      1 │ UInt64             │
   3. │      2 │ UInt64             │
   ...
 999. │    998 │ UInt64             │
1000. │    999 │ UInt64             │
      └─number─┴─toTypeName(number)─┘
```

<h2 id="output_format_pretty_display_footer_column_names_min_rows">
  output\_format\_pretty\_display\_footer\_column\_names\_min\_rows
</h2>

<SettingsInfoBlock type="UInt64" default_value="50" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.6"},{"label": "50"},{"label": "Add a setting to control the threshold value for setting output_format_pretty_display_footer_column_names_min_rows. Default 50."}]}]} />

Sets the minimum number of rows for which a footer with column names will be displayed if setting [output\_format\_pretty\_display\_footer\_column\_names](#output_format_pretty_display_footer_column_names) is enabled.

<h2 id="output_format_pretty_fallback_to_vertical">
  output\_format\_pretty\_fallback\_to\_vertical
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "A new setting"}]}]} />

If enabled, and the table is wide but short, the Pretty format will output it as the Vertical format does.
See `output_format_pretty_fallback_to_vertical_max_rows_per_chunk` and `output_format_pretty_fallback_to_vertical_min_table_width` for detailed tuning of this behavior.

<h2 id="output_format_pretty_fallback_to_vertical_max_rows_per_chunk">
  output\_format\_pretty\_fallback\_to\_vertical\_max\_rows\_per\_chunk
</h2>

<SettingsInfoBlock type="UInt64" default_value="10" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "100"},{"label": "A new setting"}]}]} />

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the number of records in a chunk is not more than the specified value.

<h2 id="output_format_pretty_fallback_to_vertical_min_columns">
  output\_format\_pretty\_fallback\_to\_vertical\_min\_columns
</h2>

<SettingsInfoBlock type="UInt64" default_value="5" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "5"},{"label": "A new setting"}]}]} />

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the number of columns is greater than the specified value.

<h2 id="output_format_pretty_fallback_to_vertical_min_table_width">
  output\_format\_pretty\_fallback\_to\_vertical\_min\_table\_width
</h2>

<SettingsInfoBlock type="UInt64" default_value="250" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "250"},{"label": "A new setting"}]}]} />

The fallback to Vertical format (see `output_format_pretty_fallback_to_vertical`) will be activated only if the sum of lengths of columns in a table is at least the specified value, or if at least one value contains a newline character.

<h2 id="output_format_pretty_glue_chunks">
  output\_format\_pretty\_glue\_chunks
</h2>

<SettingsInfoBlock type="UInt64Auto" default_value="auto" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.5"},{"label": "auto"},{"label": "A new setting to make Pretty formats prettier."}]}]} />

If the data rendered in Pretty formats arrived in multiple chunks, even after a delay, but the next chunk has the same column widths as the previous, use ANSI escape sequences to move back to the previous line and overwrite the footer of the previous chunk to continue it with the data of the new chunk. This makes the result more visually pleasant.

0 - disabled, 1 - enabled, 'auto' - enabled if a terminal.

<h2 id="output_format_pretty_grid_charset">
  output\_format\_pretty\_grid\_charset
</h2>

<SettingsInfoBlock type="String" default_value="UTF-8" />

Charset for printing grid borders. Available charsets: ASCII, UTF-8 (default).

<h2 id="output_format_pretty_highlight_digit_groups">
  output\_format\_pretty\_highlight\_digit\_groups
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "If enabled and if output is a terminal, highlight every digit corresponding to the number of thousands, millions, etc. with underline."}]}]} />

If enabled and if output is a terminal, highlight every digit corresponding to the number of thousands, millions, etc. with underline.

<h2 id="output_format_pretty_highlight_trailing_spaces">
  output\_format\_pretty\_highlight\_trailing\_spaces
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "A new setting."}]}]} />

If enabled and if output is a terminal, highlight trailing spaces with a gray color and underline.

<h2 id="output_format_pretty_max_column_name_width_cut_to">
  output\_format\_pretty\_max\_column\_name\_width\_cut\_to
</h2>

<SettingsInfoBlock type="UInt64" default_value="24" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "24"},{"label": "A new setting"}]}]} />

If the column name is too long, cut it to this length.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.

<h2 id="output_format_pretty_max_column_name_width_min_chars_to_cut">
  output\_format\_pretty\_max\_column\_name\_width\_min\_chars\_to\_cut
</h2>

<SettingsInfoBlock type="UInt64" default_value="4" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "4"},{"label": "A new setting"}]}]} />

Minimum characters to cut if the column name is too long.
The column will be cut if it is longer than `output_format_pretty_max_column_name_width_cut_to` plus `output_format_pretty_max_column_name_width_min_chars_to_cut`.

<h2 id="output_format_pretty_max_column_pad_width">
  output\_format\_pretty\_max\_column\_pad\_width
</h2>

<SettingsInfoBlock type="UInt64" default_value="250" />

Maximum width to pad all values in a column in Pretty formats.

<h2 id="output_format_pretty_max_rows">
  output\_format\_pretty\_max\_rows
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.2"},{"label": "1000"},{"label": "It is better for usability - less amount to scroll."}]}]} />

Rows limit for Pretty formats.

<h2 id="output_format_pretty_max_value_width">
  output\_format\_pretty\_max\_value\_width
</h2>

<SettingsInfoBlock type="UInt64" default_value="10000" />

Maximum width of value to display in Pretty formats. If greater - it will be cut.
The value 0 means - never cut.

<h2 id="output_format_pretty_max_value_width_apply_for_single_value">
  output\_format\_pretty\_max\_value\_width\_apply\_for\_single\_value
</h2>

<SettingsInfoBlock type="UInt64" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "0"},{"label": "Single values in Pretty formats won't be cut."}]}]} />

Only cut values (see the `output_format_pretty_max_value_width` setting) when it is not a single value in a block. Otherwise output it entirely, which is useful for the `SHOW CREATE TABLE` query.

<h2 id="output_format_pretty_multiline_fields">
  output\_format\_pretty\_multiline\_fields
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "A new setting"}]}]} />

If enabled, Pretty formats will render multi-line fields inside table cell, so the table's outline will be preserved.
If not, they will be rendered as is, potentially deforming the table (one upside of keeping it off is that copy-pasting multi-line values will be easier).

<h2 id="output_format_pretty_named_tuples_as_json">
  output\_format\_pretty\_named\_tuples\_as\_json
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.12"},{"label": "1"},{"label": "New setting to control whether named tuples in Pretty format are output as JSON objects"}]}]} />

Controls whether named tuples in Pretty format are output as pretty-printed JSON objects.

<h2 id="output_format_pretty_row_numbers">
  output\_format\_pretty\_row\_numbers
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.3"},{"label": "1"},{"label": "It is better for usability."}]}]} />

Add row numbers before each row for pretty output format

<h2 id="output_format_pretty_single_large_number_tip_threshold">
  output\_format\_pretty\_single\_large\_number\_tip\_threshold
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "1000000"},{"label": "Print a readable number tip on the right side of the table if the block consists of a single number which exceeds this value (except 0)"}]}]} />

Print a readable number tip on the right side of the table if the block consists of a single number which exceeds this value (except 0)

<h2 id="output_format_pretty_squash_consecutive_ms">
  output\_format\_pretty\_squash\_consecutive\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="50" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "50"},{"label": "Add new setting"}]}]} />

Wait for the next block for up to specified number of milliseconds and squash it to the previous before writing.
This avoids frequent output of too small blocks, but still allows to display data in a streaming fashion.

<h2 id="output_format_pretty_squash_max_wait_ms">
  output\_format\_pretty\_squash\_max\_wait\_ms
</h2>

<SettingsInfoBlock type="UInt64" default_value="1000" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1000"},{"label": "Add new setting"}]}]} />

Output the pending block in pretty formats if more than the specified number of milliseconds has passed since the previous output.

<h2 id="output_format_protobuf_nullables_with_google_wrappers">
  output\_format\_protobuf\_nullables\_with\_google\_wrappers
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When serializing Nullable columns with Google wrappers, serialize default values as empty wrappers. If turned off, default and null values are not serialized

<h2 id="output_format_schema">
  output\_format\_schema
</h2>

The path to the file where the automatically generated schema will be saved in [Cap'n Proto](/reference/formats/CapnProto) or [Protobuf](/reference/formats/Protobuf/Protobuf) formats.

<h2 id="output_format_sql_insert_include_column_names">
  output\_format\_sql\_insert\_include\_column\_names
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Include column names in INSERT query

<h2 id="output_format_sql_insert_max_batch_size">
  output\_format\_sql\_insert\_max\_batch\_size
</h2>

<SettingsInfoBlock type="UInt64" default_value="65409" />

The maximum number  of rows in one INSERT statement.

<h2 id="output_format_sql_insert_quote_names">
  output\_format\_sql\_insert\_quote\_names
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Quote column names with '\`' characters

<h2 id="output_format_sql_insert_table_name">
  output\_format\_sql\_insert\_table\_name
</h2>

<SettingsInfoBlock type="String" default_value="table" />

The name of table in the output INSERT query

<h2 id="output_format_sql_insert_use_replace">
  output\_format\_sql\_insert\_use\_replace
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Use REPLACE statement instead of INSERT

<h2 id="output_format_trim_fixed_string">
  output\_format\_trim\_fixed\_string
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.3"},{"label": "0"},{"label": "New setting to trim trailing zero bytes from FixedString values in text output formats"}]}]} />

Trim trailing null bytes from FixedString values in text output formats. E.g. `toFixedString('John', 8)` is printed as `John` instead of `John\0\0\0\0`.

<h2 id="output_format_tsv_crlf_end_of_line">
  output\_format\_tsv\_crlf\_end\_of\_line
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

If it is set true, end of line in TSV format will be \r\n instead of \n.

<h2 id="output_format_values_escape_quote_with_quote">
  output\_format\_values\_escape\_quote\_with\_quote
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "24.2"},{"label": "0"},{"label": "If true escape ' with '', otherwise quoted with \'"}]}]} />

If true escape ' with '', otherwise quoted with \\'

<h2 id="output_format_write_statistics">
  output\_format\_write\_statistics
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Write statistics about read rows, bytes, time elapsed in suitable output formats.

Enabled by default

<h2 id="precise_float_parsing">
  precise\_float\_parsing
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Prefer more precise (but slower) float parsing algorithm

<h2 id="schema_inference_hints">
  schema\_inference\_hints
</h2>

The list of column names and types to use as hints in schema inference for formats without schema.

Example:

Query:

```sql theme={null}
desc format(JSONEachRow, '{"x" : 1, "y" : "String", "z" : "0.0.0.0" }') settings schema_inference_hints='x UInt8, z IPv4';
```

Result:

```sql theme={null}
x   UInt8
y   Nullable(String)
z   IPv4
```

<Note>
  If the `schema_inference_hints` is not formatted properly, or if there is a typo or a wrong datatype, etc... the whole schema\_inference\_hints will be ignored.
</Note>

<h2 id="schema_inference_make_columns_nullable">
  schema\_inference\_make\_columns\_nullable
</h2>

<SettingsInfoBlock type="UInt64Auto" default_value="3" />

Controls making inferred types `Nullable` in schema inference.
Possible values:

* 0 - the inferred type will never be `Nullable` (use input\_format\_null\_as\_default to control what do do with null values in this case),
* 1 - all inferred types will be `Nullable`,
* 2 or `auto` - the inferred type will be `Nullable` only if the column contains `NULL` in a sample that is parsed during schema inference or file metadata contains information about column nullability,
* 3 - the inferred type nullability will match file metadata if the format has it (e.g. Parquet), always Nullable otherwise (e.g. CSV).

<h2 id="schema_inference_make_json_columns_nullable">
  schema\_inference\_make\_json\_columns\_nullable
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

Controls making inferred JSON types `Nullable` in schema inference.
If this setting is enabled together with schema\_inference\_make\_columns\_nullable, inferred JSON type will be `Nullable`.

<h2 id="schema_inference_mode">
  schema\_inference\_mode
</h2>

<SettingsInfoBlock type="SchemaInferenceMode" default_value="default" />

Mode of schema inference. 'default' - assume that all files have the same schema and schema can be inferred from any file, 'union' - files can have different schemas and the resulting schema should be the a union of schemas of all files

<h2 id="show_create_query_identifier_quoting_rule">
  show\_create\_query\_identifier\_quoting\_rule
</h2>

<SettingsInfoBlock type="IdentifierQuotingRule" default_value="when_necessary" />

Set the quoting rule for identifiers in SHOW CREATE query

<h2 id="show_create_query_identifier_quoting_style">
  show\_create\_query\_identifier\_quoting\_style
</h2>

<SettingsInfoBlock type="IdentifierQuotingStyle" default_value="Backticks" />

Set the quoting style for identifiers in SHOW CREATE query

<h2 id="type_json_allow_duplicated_key_with_literal_and_nested_object">
  type\_json\_allow\_duplicated\_key\_with\_literal\_and\_nested\_object
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

When enabled, JSONs like `{"a" : 42, "a" : {"b" : 42}}` where some key is duplicated but one of them is a nested object are allowed to be parsed.

<h2 id="type_json_skip_duplicated_paths">
  type\_json\_skip\_duplicated\_paths
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When enabled, during parsing JSON object into JSON type duplicated paths will be ignored and only the first one will be inserted instead of an exceptio

<h2 id="type_json_skip_invalid_typed_paths">
  type\_json\_skip\_invalid\_typed\_paths
</h2>

<SettingsInfoBlock type="Bool" default_value="0" />

When enabled, fields with values that cannot be coerced to their declared type in JSON type columns with typed paths are skipped instead of throwing an error. Skipped fields are treated as missing and will use default/null values based on the typed path definition.

This setting only applies to JSON type columns (e.g., JSON(a Int64, b String)) where specific paths have declared types. It does not apply to regular JSON input formats like JSONEachRow when inserting into regular typed columns.

Possible values:

* 0 — Disable (throw error on type mismatch).
* 1 — Enable (skip field on type mismatch).

<h2 id="type_json_use_partial_match_to_skip_paths_by_regexp">
  type\_json\_use\_partial\_match\_to\_skip\_paths\_by\_regexp
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

When enabled, during parsing JSON object into JSON type regular expressions specified using SKIP REGEXP will require partial match to skip a path. When disabled, full match will be required.

<h2 id="validate_experimental_and_suspicious_types_inside_nested_types">
  validate\_experimental\_and\_suspicious\_types\_inside\_nested\_types
</h2>

<SettingsInfoBlock type="Bool" default_value="1" />

Validate usage of experimental and suspicious types inside nested types like Array/Map/Tuple
