Format Settings

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

The default value is 0.

Always pair it with `input_format_allow_errors_num`.

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

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

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

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

Enabled by default.

## input\_format\_arrow\_allow\_missing\_columns[​](#input_format_arrow_allow_missing_columns "Direct link to input_format_arrow_allow_missing_columns")

Allow missing columns while reading Arrow input formats

## input\_format\_arrow\_case\_insensitive\_column\_matching[​](#input_format_arrow_case_insensitive_column_matching "Direct link to input_format_arrow_case_insensitive_column_matching")

Ignore case when matching Arrow columns with CH columns.

## input\_format\_arrow\_skip\_columns\_with\_unsupported\_types\_in\_schema\_inference[​](#input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference "Direct link to input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference")

Skip columns with unsupported types while schema inference for format Arrow

## input\_format\_avro\_allow\_missing\_fields[​](#input_format_avro_allow_missing_fields "Direct link to input_format_avro_allow_missing_fields")

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

## input\_format\_avro\_null\_as\_default[​](#input_format_avro_null_as_default "Direct link to input_format_avro_null_as_default")

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

## input\_format\_binary\_decode\_types\_in\_binary\_format[​](#input_format_binary_decode_types_in_binary_format "Direct link to input_format_binary_decode_types_in_binary_format")

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

## input\_format\_binary\_max\_type\_complexity[​](#input_format_binary_max_type_complexity "Direct link to input_format_binary_max_type_complexity")

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

## input\_format\_binary\_read\_json\_as\_string[​](#input_format_binary_read_json_as_string "Direct link to input_format_binary_read_json_as_string")

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

## input\_format\_bson\_skip\_fields\_with\_unsupported\_types\_in\_schema\_inference[​](#input_format_bson_skip_fields_with_unsupported_types_in_schema_inference "Direct link to input_format_bson_skip_fields_with_unsupported_types_in_schema_inference")

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

## input\_format\_capn\_proto\_skip\_fields\_with\_unsupported\_types\_in\_schema\_inference[​](#input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference "Direct link to input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference")

Skip columns with unsupported types while schema inference for format CapnProto

## input\_format\_connection\_handling[​](#input_format_connection_handling "Direct link to input_format_connection_handling")

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

## input\_format\_csv\_allow\_cr\_end\_of\_line[​](#input_format_csv_allow_cr_end_of_line "Direct link to input_format_csv_allow_cr_end_of_line")

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

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

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

## input\_format\_csv\_allow\_whitespace\_or\_tab\_as\_delimiter[​](#input_format_csv_allow_whitespace_or_tab_as_delimiter "Direct link to input_format_csv_allow_whitespace_or_tab_as_delimiter")

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

## input\_format\_csv\_arrays\_as\_nested\_csv[​](#input_format_csv_arrays_as_nested_csv "Direct link to input_format_csv_arrays_as_nested_csv")

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.

## input\_format\_csv\_deserialize\_separate\_columns\_into\_tuple[​](#input_format_csv_deserialize_separate_columns_into_tuple "Direct link to input_format_csv_deserialize_separate_columns_into_tuple")

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

## input\_format\_csv\_detect\_header[​](#input_format_csv_detect_header "Direct link to input_format_csv_detect_header")

Automatically detect header with names and types in CSV format

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

Treat empty fields in CSV input as default values.

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

Treat inserted enum values in CSV formats as enum indices

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

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

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

Skip trailing empty lines in CSV format

## input\_format\_csv\_trim\_whitespaces[​](#input_format_csv_trim_whitespaces "Direct link to input_format_csv_trim_whitespaces")

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

## input\_format\_csv\_try\_infer\_numbers\_from\_strings[​](#input_format_csv_try_infer_numbers_from_strings "Direct link to input_format_csv_try_infer_numbers_from_strings")

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.

## input\_format\_csv\_try\_infer\_strings\_from\_quoted\_tuples[​](#input_format_csv_try_infer_strings_from_quoted_tuples "Direct link to input_format_csv_try_infer_strings_from_quoted_tuples")

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

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

Use some tweaks and heuristics to infer schema in CSV format

## input\_format\_csv\_use\_default\_on\_bad\_values[​](#input_format_csv_use_default_on_bad_values "Direct link to input_format_csv_use_default_on_bad_values")

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

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

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