These settings are autogenerated from source.
input_format_allow_errors_num
Sets the maximum number of acceptable errors when reading from text formats (CSV, TSV, etc.).
The default value is 0.
Always pair it with input_format_allow_errors_ratio.
If an error occurred while reading rows but the error counter is still less than input_format_allow_errors_num, ClickHouse ignores the row and moves on to the next one.
If both input_format_allow_errors_num and input_format_allow_errors_ratio are exceeded, ClickHouse throws an exception.
input_format_allow_errors_ratio
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
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.
input_format_arrow_allow_missing_columns
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.12 | 1 | Allow missing columns in Arrow files by default |
Allow missing columns while reading Arrow input formats
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
Skip columns with unsupported types while schema inference for format Arrow
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
For Avro/AvroConfluent format: insert default in case of null and non Nullable colum
input_format_binary_decode_types_in_binary_format
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.7 | 0 | 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
input_format_binary_max_type_complexity
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.1 | 1000 | 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.
input_format_binary_read_json_as_string
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.10 | 0 | Add new setting to read values of JSON type as JSON string in RowBinary input format |
Read values of JSON data type as JSON String values in RowBinary input format.
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
Skip columns with unsupported types while schema inference for format CapnProto
input_format_column_name_matching_mode
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.5 | auto | Match input column names case-sensitively first and fall back to case-insensitive matching, instead of requiring an exact case match. |
| 26.4 | match_case | 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.
input_format_connection_handling
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.2 | 0 | 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
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
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
Allow to use spaces and tabs(\t) as field delimiter in the CSV strings
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
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.6 | 1 | A new way of how interpret tuples in CSV format was added. |
| 24.3 | 1 | 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.
This applies only to bare Tuple. A Nullable(Tuple) is always written as a single CSV field (see output_format_csv_serialize_tuple_into_separate_columns) and is likewise read back from a single field, never from separate columns, regardless of this setting. Separate-columns parsing is not supported for Nullable(Tuple) because a leading \N field is ambiguous (it may be the outer NULL of the tuple or the NULL of its first element).
Because a bare Tuple then occupies one field per element, a \N in the field of a direct top-level element is that element and not the whole column, so input_format_null_as_default applies to that element. A row that supplies a single field for the whole tuple is short by the remaining elements and is rejected instead of taking the column default. Set this setting to 0 to read such a field as the whole column again. A \N in the field of an element of a nested Tuple is still read as that whole nested element.
input_format_csv_detect_header
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.1 | 1 | Detect header in CSV format by default |
Automatically detect header with names and types in CSV format
input_format_csv_empty_as_default
Treat empty fields in CSV input as default values.
input_format_csv_enum_as_number
Treat inserted enum values in CSV formats as enum indices
input_format_csv_missing_nullable_as_empty_string
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.7 | 0 | 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.
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
Skip trailing empty lines in CSV format
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
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
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.6 | 1 | A new way of how interpret tuples in CSV format was added. |
| 24.3 | 1 | 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.
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
Allow to set default value to column when CSV field deserialization failed on bad value
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
input_format_custom_detect_header
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.1 | 1 | Detect header in CustomSeparated format by default |
Automatically detect header with names and types in CustomSeparated format
input_format_custom_skip_trailing_empty_lines
Skip trailing empty lines in CustomSeparated format
input_format_defaults_for_omitted_fields
Version history
| Version | Default value | Comment |
|---|---|---|
| 19.12 | 1 | 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 (and other JSON formats), CSV, TabSeparated, TSKV, Parquet, Arrow, Avro, ORC, Native formats and formats with WithNames/WithNamesAndTypes suffixes.
Possible values:
- 0 — Disabled.
- 1 — Enabled.
input_format_force_null_for_omitted_fields
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.5 | 0 | Disable type-defaults for omitted fields when needed |
Force initialize omitted fields with null values
input_format_geojson_unsupported_geometry_handling
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.6 | throw | New setting that controls handling of GeoJSON geometry types that cannot be represented in the Geometry type (such as GeometryCollection) |
Controls what happens when a valid GeoJSON geometry type that cannot be represented in ClickHouse’s Geometry type (such as GeometryCollection) must be stored in the geometry column while reading GeoJSON input.
Possible values:
'throw'(default) — throw an exception.'null'— insert aNULLvalue for thegeometrycolumn 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.
input_format_hive_text_allow_variable_number_of_columns
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.4 | 1 | 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
input_format_hive_text_collection_items_delimiter
Delimiter between collection(array or map) items in Hive Text File
input_format_hive_text_fields_delimiter
Delimiter between fields in Hive Text File
input_format_hive_text_map_keys_delimiter
Delimiter between a pair of map key/values in Hive Text File
input_format_import_nested_json
Enables or disables the insertion of JSON data with nested objects.
Supported formats:
Possible values:
- 0 — Disabled.
- 1 — Enabled.
See also:
- Usage of Nested Structures with the
JSONEachRowformat.
input_format_ipv4_default_on_conversion_error
Deserialization of IPv4 will use default values instead of throwing exception on conversion error.
Disabled by default.
input_format_ipv6_default_on_conversion_error
Deserialization of IPV6 will use default values instead of throwing exception on conversion error.
Disabled by default.
input_format_json_compact_allow_variable_number_of_columns
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.
input_format_json_defaults_for_missing_elements_in_named_tuple
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.1 | 1 | 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.
input_format_json_empty_as_default
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.9 | 0 | 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.
input_format_json_ignore_unknown_keys_in_named_tuple
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.3 | 1 | Improve parsing JSON objects as named tuples |
Ignore unknown keys in json object for named tuples.
Enabled by default.
input_format_json_ignore_unnecessary_fields
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.4 | 1 | 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
input_format_json_infer_array_of_dynamic_from_array_of_different_types
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.8 | 1 | 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:
SET input_format_json_infer_array_of_dynamic_from_array_of_different_types=1;
DESC format(JSONEachRow, '{"a" : [42, "hello", [1, 2, 3]]}');┌─name─┬─type───────────┐
│ a │ Array(Dynamic) │
└──────┴────────────────┘SET input_format_json_infer_array_of_dynamic_from_array_of_different_types=0;
DESC format(JSONEachRow, '{"a" : [42, "hello", [1, 2, 3]]}');┌─name─┬─type─────────────────────────────────────────────────────────────┐
│ a │ Tuple(Nullable(Int64), Nullable(String), Array(Nullable(Int64))) │
└──────┴──────────────────────────────────────────────────────────────────┘Enabled by default.
input_format_json_infer_incomplete_types_as_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.9 | 1 | 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:
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.
input_format_json_map_as_array_of_tuples
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.7 | 0 | New setting |
Deserialize maps columns as JSON arrays of tuples.
Disabled by default.
input_format_json_max_depth
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.8 | 1000 | 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.
input_format_json_max_object_size
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 536870912 | New setting to limit the maximum size of a single JSON object in bytes |
Maximum allowed size of a single JSON object in bytes. Objects exceeding this limit are rejected as likely malformed. This protects against memory exhaustion when a malformed JSON document is parsed as a single object. The same limit is applied in both parallel and non-parallel parsing paths. Set to 0 to disable the check.
input_format_json_max_string_column_growth_step
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 0 | New setting to cap the power-of-two growth of the JSON column's internal String buffers while materializing JSON, bounding over-allocation. |
When building the JSON column’s internal String buffers while parsing JSON from string, cap the power-of-two growth at this many bytes: once the reserved size reaches this value, the buffer grows by increments of this size instead of doubling. This bounds over-allocation for large JSON columns. 0 means unlimited (pure doubling).
input_format_json_named_tuples_as_objects
Parse named tuple columns as JSON objects.
Enabled by default.
input_format_json_read_arrays_as_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.9 | 1 | Allow to read arrays as strings in JSON formats by default |
Allow parsing JSON arrays as strings in JSON input formats.
Example:
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.
input_format_json_read_bools_as_numbers
Allow parsing bools as numbers in JSON input formats.
Enabled by default.
input_format_json_read_bools_as_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.1 | 1 | Allow to read bools as strings in JSON formats by default |
Allow parsing bools as strings in JSON input formats.
Enabled by default.
input_format_json_read_numbers_as_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.9 | 1 | Allow to read numbers as strings in JSON formats by default |
Allow parsing numbers as strings in JSON input formats.
Enabled by default.
input_format_json_read_objects_as_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.1 | 1 | Enable reading nested json objects as strings while object type is experimental |
Allow parsing JSON objects as strings in JSON input formats.
Example:
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.
input_format_json_throw_on_bad_escape_sequence
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.4 | 1 | 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.
input_format_json_try_infer_named_tuples_from_objects
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.9 | 1 | 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:
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.
input_format_json_try_infer_numbers_from_strings
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.9 | 0 | 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.
input_format_json_use_string_type_for_ambiguous_paths_in_named_tuples_inference_from_objects
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.3 | 0 | 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
input_format_json_validate_types_from_metadata
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.
input_format_max_block_size_bytes
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.5 | 0 | 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.
input_format_max_block_wait_ms
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.2 | 0 | 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.
Example: streaming Wikipedia recent changes into ClickHouse
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 0input_format_max_bytes_to_read_for_schema_inference
The maximum amount of data in bytes to read for automatic schema inference.
input_format_max_rows_to_read_for_schema_inference
The maximum rows of data to read for automatic schema inference.
input_format_msgpack_number_of_columns
The number of columns in inserted MsgPack data. Used for automatic schema inference from data.
input_format_mysql_dump_map_column_names
Match columns from table in MySQL dump and columns from ClickHouse table by names
input_format_mysql_dump_table_name
Name of the table in MySQL dump from which to read data
input_format_native_allow_types_conversion
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.3 | 1 | Allow types conversion in Native input forma |
Allow data types conversion in Native input format
input_format_native_decode_types_in_binary_format
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.7 | 0 | 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
input_format_null_as_default
Version history
| Version | Default value | Comment |
|---|---|---|
| 21.1 | 1 | Allow to insert NULL as default for input formats by default |
Enables or disables the initialization of NULL fields with default values, if data type of these fields is not 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
NULLinto a not nullable column causes an exception. - 1 —
NULLfields are initialized with default column values.
input_format_orc_allow_missing_columns
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.12 | 1 | Allow missing columns in ORC files by default |
Allow missing columns while reading ORC input formats
input_format_orc_case_insensitive_column_matching
Ignore case when matching ORC columns with CH columns.
input_format_orc_dictionary_as_low_cardinality
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.10 | 1 | Treat ORC dictionary encoded columns as LowCardinality columns while reading ORC files |
Treat ORC dictionary encoded columns as LowCardinality columns while reading ORC files.
input_format_orc_filter_push_down
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.
input_format_orc_reader_time_zone_name
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.7 | GMT | 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.
input_format_orc_row_batch_size
Batch size when reading ORC stripes.
input_format_orc_skip_columns_with_unsupported_types_in_schema_inference
Skip columns with unsupported types while schema inference for format ORC
input_format_parallel_parsing
Enables or disables order-preserving parallel parsing of data formats. Supported only for TabSeparated (TSV), TSKV, CSV and JSONEachRow formats.
Possible values:
- 1 — Enabled.
- 0 — Disabled.
input_format_parquet_allow_geoparquet_parser
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.5 | 1 | A new setting to use geo columns in parquet file |
Use geo column parser to convert Array(UInt8) into Point/MultiPoint/Linestring/Polygon/MultiLineString/MultiPolygon types
input_format_parquet_allow_missing_columns
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.12 | 1 | Allow missing columns in Parquet files by default |
Allow missing columns while reading Parquet input formats
input_format_parquet_bloom_filter_push_down
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.5 | 1 | When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and bloom filter in the Parquet metadata. |
| 24.10 | 0 | 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.
input_format_parquet_case_insensitive_column_matching
Ignore case when matching Parquet columns with CH columns.
input_format_parquet_dictionary_filter_push_down
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 1048576 | New setting enabling Parquet row-group pruning based on dictionary page contents (reader v3). The value is the maximum dictionary page size in bytes for which the optimization applies; 0 (the previous behavior) disables it. |
When reading Parquet files (with reader v3), skip whole row groups based on the WHERE/PREWHERE expressions and the dictionary page contents, when all data pages of a column chunk are dictionary-encoded. The value is the maximum dictionary page size (in bytes) for which this optimization is applied; set to 0 to disable. This takes precedence over the bloom filter when both are available.
input_format_parquet_enable_json_parsing
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.6 | 1 | When reading Parquet files, parse JSON columns as ClickHouse JSON Column. |
When reading Parquet files, parse JSON columns as ClickHouse JSON Column.
input_format_parquet_enable_row_group_prefetch
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.10 | 1 | 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.
input_format_parquet_filter_push_down
When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and min/max statistics in the Parquet metadata.
input_format_parquet_local_file_min_bytes_for_seek
Min bytes required for local read (file) to do seek, instead of read with ignore in Parquet input format
input_format_parquet_local_time_as_utc
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.11 | 1 | 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.
input_format_parquet_max_block_size
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.6 | 65409 | Increase block size for parquet reader. |
Max block size for parquet reader.
input_format_parquet_memory_high_watermark
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.8 | 4294967296 | 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.
input_format_parquet_memory_low_watermark
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.8 | 2097152 | 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.
input_format_parquet_page_filter_push_down
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.8 | 1 | New setting (no effect when input_format_parquet_use_native_reader_v3 is disabled) |
Skip pages using min/max values from column index.
input_format_parquet_prefer_block_bytes
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.6 | 16744704 | Average block bytes output by parquet reader. |
Average block bytes output by parquet reader
input_format_parquet_preserve_order
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.5 | 0 | 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.
input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference
Skip columns with unsupported types while schema inference for format Parquet
input_format_parquet_spatial_filter_push_down
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 1 | New setting: skip GeoParquet row groups and pages based on spatial predicates and bounding box statistics |
When reading GeoParquet files, skip whole row groups and, together with input_format_parquet_page_filter_push_down, individual pages based on spatial predicates in the WHERE clause and the geometry bounding box statistics (geospatial_statistics.bbox or covering.bbox columns) in the Parquet metadata.
input_format_parquet_use_offset_index
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.8 | 1 | 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.
input_format_parquet_verify_checksums
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.11 | 1 | New setting. |
Verify page checksums when reading parquet files.
input_format_protobuf_flatten_google_wrappers
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
input_format_protobuf_oneof_presence
Version history
| Version | Default value | Comment |
|---|---|---|
| 25.9 | 0 | New setting |
Indicate which field of protobuf oneof was found by means of setting enum value in a special colum
input_format_protobuf_skip_fields_with_unsupported_types_in_schema_inference
Skip fields with unsupported types while schema inference for format Protobuf
input_format_read_datetime_number_as_raw_value
Version history
| Version | Default value | Comment |
|---|---|---|
| 26.8 | 0 | From 26.8, an unquoted number for a `DateTime`/`DateTime64` column in the `JSON` and `Values`/`Quoted` paths (and in `JSONExtract` and typed `JSON`) is a Unix timestamp in seconds, consistent with the `Values` format, `CAST` and `toDateTime64`. Set this to `true` (or `SET compatibility = '26.7'`) to restore the pre-26.8 behavior, where a bare unquoted integer fed to a `DateTime64` column was read as the raw scaled value (ticks). The tab-separated, CSV and other escaped/whole-text formats are not governed by this setting. |
Read a bare unquoted integer for a DateTime/DateTime64 column as the raw underlying value — seconds for
DateTime, ticks at the column precision for DateTime64 — instead of a Unix timestamp in seconds.
Disabled by default: an unquoted number is a Unix timestamp in seconds (with optional sub-second precision),
consistent with the Values format, CAST and toDateTime64. Enable it (or SET compatibility = '26.7') to
restore the behavior of versions up to and including 26.7, where a bare unquoted integer fed to a DateTime64
column was interpreted as the raw scaled value (ticks). The legacy path accepts only such a bare integer:
with the setting enabled, a number with a fractional or exponent part is rejected by the row input paths
(as before 26.8), while in JSONExtract and the typed JSON type a fractional number is still read as
seconds for DateTime64 and rejected for DateTime (also as before 26.8). In the Values format itself,
a number the streaming parser rejects then falls back to SQL expression evaluation and is read as seconds,
both before 26.8 and with this setting enabled — so the Values behavior for a fractional number is the
same in every configuration.
This setting governs only the JSON, Values/Quoted and JSONExtract/typed JSON paths (the Quoted path
covers every format parsing fields with the Quoted escaping rule: Values, MySQLDump, and
Template/CustomSeparated/Regexp configured with Quoted field escaping). The tab-separated, CSV and other
escaped/whole-text formats are unaffected: there a large unquoted DateTime64 number is still read as ticks.
input_format_record_errors_file_path
Path of the file used to record errors while reading text formats (CSV, TSV).
input_format_skip_unknown_fields
Version history
| Version | Default value | Comment |
|---|---|---|
| 22.6 | 1 | 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 (and other JSON formats)
- BSONEachRow (and other JSON formats)
- TSKV
- All formats with suffixes WithNames/WithNamesAndTypes
- MySQLDump
- Native
Possible values:
- 0 — Disabled.
- 1 — Enabled.
input_format_try_infer_dates
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.
input_format_try_infer_datetimes
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.
input_format_try_infer_datetimes_only_datetime64
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.8 | 0 | 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
input_format_try_infer_exponent_floats
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.2 | 0 | 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)
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
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.9 | 0 | 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 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
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
Version history
| Version | Default value | Comment |
|---|---|---|
| 24.5 | 0 | 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.
input_format_tsv_detect_header
Version history
| Version | Default value | Comment |
|---|---|---|
| 23.1 | 1 | Detect header in TSV format by default |
Automatically detect header with names and types in TSV format
input_format_tsv_empty_as_default
Treat empty fields in TSV input as default values.
input_format_tsv_enum_as_number
Treat inserted enum values in TSV formats as enum indices.
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
Skip trailing empty lines in TSV format
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
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
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
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
Version history
| Version | Default value | Comment |
|---|---|---|
| 20.5 | 1 | 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
- CSVWithNamesAndTypes
- TabSeparatedWithNames
- TabSeparatedWithNamesAndTypes
- JSONCompactEachRowWithNames
- JSONCompactEachRowWithNamesAndTypes
- JSONCompactStringsEachRowWithNames
- JSONCompactStringsEachRowWithNamesAndTypes
- RowBinaryWithNames
- RowBinaryWithNamesAndTypes
- CustomSeparatedWithNames
- CustomSeparatedWithNamesAndTypes
Possible values:
- 0 — Disabled.
- 1 — Enabled.
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
- TabSeparatedWithNamesAndTypes
- JSONCompactEachRowWithNamesAndTypes
- JSONCompactStringsEachRowWithNamesAndTypes
- RowBinaryWithNamesAndTypes
- CustomSeparatedWithNamesAndTypes
Possible values:
- 0 — Disabled.
- 1 — Enabled.