Format Settings

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

## input\_format\_try\_infer\_integers[​](#input_format_try_infer_integers "Direct link to input_format_try_infer_integers")

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.

## input\_format\_try\_infer\_variants[​](#input_format_try_infer_variants "Direct link to input_format_try_infer_variants")

If enabled, ClickHouse will try to infer type [`Variant`](/docs/sql-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.

## input\_format\_tsv\_allow\_variable\_number\_of\_columns[​](#input_format_tsv_allow_variable_number_of_columns "Direct link to input_format_tsv_allow_variable_number_of_columns")

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

## input\_format\_tsv\_crlf\_end\_of\_line[​](#input_format_tsv_crlf_end_of_line "Direct link to input_format_tsv_crlf_end_of_line")

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

## input\_format\_tsv\_detect\_header[​](#input_format_tsv_detect_header "Direct link to input_format_tsv_detect_header")

Automatically detect header with names and types in TSV format

## input\_format\_tsv\_empty\_as\_default[​](#input_format_tsv_empty_as_default "Direct link to input_format_tsv_empty_as_default")

Treat empty fields in TSV input as default values.

## input\_format\_tsv\_enum\_as\_number[​](#input_format_tsv_enum_as_number "Direct link to input_format_tsv_enum_as_number")

Treat inserted enum values in TSV formats as enum indices.

## input\_format\_tsv\_skip\_first\_lines[​](#input_format_tsv_skip_first_lines "Direct link to input_format_tsv_skip_first_lines")

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

## input\_format\_tsv\_skip\_trailing\_empty\_lines[​](#input_format_tsv_skip_trailing_empty_lines "Direct link to input_format_tsv_skip_trailing_empty_lines")

Skip trailing empty lines in TSV format

## input\_format\_tsv\_use\_best\_effort\_in\_schema\_inference[​](#input_format_tsv_use_best_effort_in_schema_inference "Direct link to input_format_tsv_use_best_effort_in_schema_inference")

Use some tweaks and heuristics to infer schema in TSV format

## input\_format\_values\_accurate\_types\_of\_literals[​](#input_format_values_accurate_types_of_literals "Direct link to input_format_values_accurate_types_of_literals")

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

## input\_format\_values\_deduce\_templates\_of\_expressions[​](#input_format_values_deduce_templates_of_expressions "Direct link to input_format_values_deduce_templates_of_expressions")

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.

## input\_format\_values\_interpret\_expressions[​](#input_format_values_interpret_expressions "Direct link to input_format_values_interpret_expressions")

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

## input\_format\_with\_names\_use\_header[​](#input_format_with_names_use_header "Direct link to input_format_with_names_use_header")

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/interfaces/formats/CSVWithNames)
- [CSVWithNamesAndTypes](/docs/interfaces/formats/CSVWithNamesAndTypes)
- [TabSeparatedWithNames](/docs/interfaces/formats/TabSeparatedWithNames)
- [TabSeparatedWithNamesAndTypes](/docs/interfaces/formats/TabSeparatedWithNamesAndTypes)
- [JSONCompactEachRowWithNames](/docs/interfaces/formats/JSONCompactEachRowWithNames)
- [JSONCompactEachRowWithNamesAndTypes](/docs/interfaces/formats/JSONCompactEachRowWithNamesAndTypes)
- [JSONCompactStringsEachRowWithNames](/docs/interfaces/formats/JSONCompactStringsEachRowWithNames)
- [JSONCompactStringsEachRowWithNamesAndTypes](/docs/interfaces/formats/JSONCompactStringsEachRowWithNamesAndTypes)
- [RowBinaryWithNames](/docs/interfaces/formats/RowBinaryWithNames)
- [RowBinaryWithNamesAndTypes](/docs/interfaces/formats/RowBinaryWithNamesAndTypes)
- [CustomSeparatedWithNames](/docs/interfaces/formats/CustomSeparatedWithNames)
- [CustomSeparatedWithNamesAndTypes](/docs/interfaces/formats/CustomSeparatedWithNamesAndTypes)

Possible values:

- 0 — Disabled.
- 1 — Enabled.

## input\_format\_with\_types\_use\_header[​](#input_format_with_types_use_header "Direct link to input_format_with_types_use_header")

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

Supported formats:

- [CSVWithNamesAndTypes](/docs/interfaces/formats/CSVWithNamesAndTypes)
- [TabSeparatedWithNamesAndTypes](/docs/interfaces/formats/TabSeparatedWithNamesAndTypes)
- [JSONCompactEachRowWithNamesAndTypes](/docs/interfaces/formats/JSONCompactEachRowWithNamesAndTypes)
- [JSONCompactStringsEachRowWithNamesAndTypes](/docs/interfaces/formats/JSONCompactStringsEachRowWithNamesAndTypes)
- [RowBinaryWithNamesAndTypes](/docs/interfaces/formats/RowBinaryWithNamesAndTypes)
- [CustomSeparatedWithNamesAndTypes](/docs/interfaces/formats/CustomSeparatedWithNamesAndTypes)

Possible values:

- 0 — Disabled.
- 1 — Enabled.

## insert\_distributed\_one\_random\_shard[​](#insert_distributed_one_random_shard "Direct link to insert_distributed_one_random_shard")

Enables or disables random shard insertion into a [Distributed](/docs/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.

## interval\_output\_format[​](#interval_output_format "Direct link to interval_output_format")

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](/docs/sql-reference/data-types/special-data-types/interval)

## into\_outfile\_create\_parent\_directories[​](#into_outfile_create_parent_directories "Direct link to into_outfile_create_parent_directories")

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

## json\_type\_escape\_dots\_in\_keys[​](#json_type_escape_dots_in_keys "Direct link to json_type_escape_dots_in_keys")

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