> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# input_format_* format settings

> ClickHouse format settings in the input_format_* generated group.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>Type</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Default</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Changeable without restart
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

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

<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_arrow_use_native_reader">
  input\_format\_arrow\_use\_native\_reader
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "1"},{"label": "New setting to use the native ClickHouse reader for the Arrow and ArrowStream formats instead of the Apache Arrow library."}]}]} />

Use the native ClickHouse reader for the Arrow and ArrowStream formats instead of the one based on the Apache Arrow library.

<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](/docs/reference/data-types/newjson) data type as JSON [String](/docs/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_missing_nullable_as_empty_string">
  input\_format\_csv\_missing\_nullable\_as\_empty\_string
</h2>

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

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "0"},{"label": "New setting to read a missing value of `Nullable(String)` from CSV as an empty string instead of NULL."}]}]} />

Controls how `Nullable(String)` is read from a missing value in CSV. A missing value is an empty space between/before/after commas, not surrounded by quotes. If this setting is enabled, regardless of the value of `input_format_csv_empty_as_default`, the missing value of `Nullable(String)` will be interpreted as an empty `String`, not as NULL.

<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](/docs/reference/formats/JSON/JSONEachRow) (and other JSON formats), [CSV](/docs/reference/formats/CSV/CSV), [TabSeparated](/docs/reference/formats/TabSeparated/TabSeparated), [TSKV](/docs/reference/formats/TabSeparated/TSKV), [Parquet](/docs/reference/formats/Parquet/Parquet), [Arrow](/docs/reference/formats/Arrow/Arrow), [Avro](/docs/reference/formats/Avro/Avro), [ORC](/docs/reference/formats/ORC), [Native](/docs/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_geojson_unsupported_geometry_handling">
  input\_format\_geojson\_unsupported\_geometry\_handling
</h2>

<SettingsInfoBlock type="GeoJSONUnsupportedGeometryHandling" default_value="throw" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.6"},{"label": "throw"},{"label": "New setting that controls handling of GeoJSON geometry types that cannot be represented in the Geometry type (GeometryCollection, MultiPoint)"}]}]} />

Controls what happens when a valid `GeoJSON` geometry type that cannot be represented in ClickHouse's `Geometry` type (such as `GeometryCollection` or `MultiPoint`) must be stored in the `geometry` column while reading `GeoJSON` input.

Possible values:

* `'throw'` (default) — throw an exception.
* `'null'` — insert a `NULL` value for the `geometry` column and continue parsing.

This applies only when the `geometry` column is materialized. When it is not a requested output column, such a geometry is validated for well-formedness but does not trigger the handling.

<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](/docs/reference/formats/JSON/JSONEachRow)

Possible values:

* 0 — Disabled.
* 1 — Enabled.

See also:

* [Usage of Nested Structures](/docs/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](/docs/reference/syntax#literals) fields with [default values](/docs/reference/statements/create/table#default_values), if data type of these fields is not [nullable](/docs/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)](/docs/reference/formats/TabSeparated/TabSeparated), [TSKV](/docs/reference/formats/TabSeparated/TSKV), [CSV](/docs/reference/formats/CSV/CSV) and [JSONEachRow](/docs/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](/docs/reference/formats/JSON/JSONEachRow) (and other JSON formats)
* [BSONEachRow](/docs/reference/formats/BSONEachRow) (and other JSON formats)
* [TSKV](/docs/reference/formats/TabSeparated/TSKV)
* All formats with suffixes WithNames/WithNamesAndTypes
* [MySQLDump](/docs/reference/formats/MySQLDump)
* [Native](/docs/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`](/docs/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](/docs/reference/formats/CSV/CSVWithNames)
* [CSVWithNamesAndTypes](/docs/reference/formats/CSV/CSVWithNamesAndTypes)
* [TabSeparatedWithNames](/docs/reference/formats/TabSeparated/TabSeparatedWithNames)
* [TabSeparatedWithNamesAndTypes](/docs/reference/formats/TabSeparated/TabSeparatedWithNamesAndTypes)
* [JSONCompactEachRowWithNames](/docs/reference/formats/JSON/JSONCompactEachRowWithNames)
* [JSONCompactEachRowWithNamesAndTypes](/docs/reference/formats/JSON/JSONCompactEachRowWithNamesAndTypes)
* [JSONCompactStringsEachRowWithNames](/docs/reference/formats/JSON/JSONCompactStringsEachRowWithNames)
* [JSONCompactStringsEachRowWithNamesAndTypes](/docs/reference/formats/JSON/JSONCompactStringsEachRowWithNamesAndTypes)
* [RowBinaryWithNames](/docs/reference/formats/RowBinary/RowBinaryWithNames)
* [RowBinaryWithNamesAndTypes](/docs/reference/formats/RowBinary/RowBinaryWithNamesAndTypes)
* [CustomSeparatedWithNames](/docs/reference/formats/CustomSeparated/CustomSeparatedWithNames)
* [CustomSeparatedWithNamesAndTypes](/docs/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](/docs/reference/formats/CSV/CSVWithNamesAndTypes)
* [TabSeparatedWithNamesAndTypes](/docs/reference/formats/TabSeparated/TabSeparatedWithNamesAndTypes)
* [JSONCompactEachRowWithNamesAndTypes](/docs/reference/formats/JSON/JSONCompactEachRowWithNamesAndTypes)
* [JSONCompactStringsEachRowWithNamesAndTypes](/docs/reference/formats/JSON/JSONCompactStringsEachRowWithNamesAndTypes)
* [RowBinaryWithNamesAndTypes](/docs/reference/formats/RowBinary/RowBinaryWithNamesAndTypes)
* [CustomSeparatedWithNamesAndTypes](/docs/reference/formats/CustomSeparated/CustomSeparatedWithNamesAndTypes)

Possible values:

* 0 — Disabled.
* 1 — Enabled.
