Skip to content
ClickHouse Docs
ClickHouse DocsClickHouse Docs

input_format_* format settings

These settings are autogenerated from source.

input_format_allow_errors_num

Type
UInt64
Default
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.

input_format_allow_errors_ratio

Type
Float
Default
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.

input_format_allow_seeks

Type
Bool
Default
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.

input_format_arrow_allow_missing_columns

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.121Allow missing columns in Arrow files by default

Allow missing columns while reading Arrow input formats

input_format_arrow_case_insensitive_column_matching

Type
Bool
Default
0

Ignore case when matching Arrow columns with CH columns.

input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference

Type
Bool
Default
0

Skip columns with unsupported types while schema inference for format Arrow

input_format_avro_allow_missing_fields

Type
Bool
Default
0

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

input_format_avro_null_as_default

Type
Bool
Default
0

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

input_format_binary_decode_types_in_binary_format

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.70Added 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

Type
UInt64
Default
1000
Version history
VersionDefault valueComment
26.11000Add 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.100Add 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

Type
Bool
Default
0

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

input_format_capn_proto_skip_fields_with_unsupported_types_in_schema_inference

Type
Bool
Default
0

Skip columns with unsupported types while schema inference for format CapnProto

input_format_column_name_matching_mode

Type
InputFormatColumnMatchingCaseSensitivity
Default
auto
Version history
VersionDefault valueComment
26.5autoMatch input column names case-sensitively first and fall back to case-insensitive matching, instead of requiring an exact case match.
26.4match_caseNew 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.20New 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

Type
Bool
Default
0

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

input_format_csv_allow_variable_number_of_columns

Type
Bool
Default
0

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

Type
Bool
Default
0

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

input_format_csv_arrays_as_nested_csv

Type
Bool
Default
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.

input_format_csv_deserialize_separate_columns_into_tuple

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.61A new way of how interpret tuples in CSV format was added.
24.31A 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.11Detect header in CSV format by default

Automatically detect header with names and types in CSV format

input_format_csv_empty_as_default

Type
Bool
Default
1

Treat empty fields in CSV input as default values.

input_format_csv_enum_as_number

Type
Bool
Default
0

Treat inserted enum values in CSV formats as enum indices

input_format_csv_missing_nullable_as_empty_string

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.70New 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

Type
UInt64
Default
0

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

input_format_csv_skip_trailing_empty_lines

Type
Bool
Default
0

Skip trailing empty lines in CSV format

input_format_csv_trim_whitespaces

Type
Bool
Default
1

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

input_format_csv_try_infer_numbers_from_strings

Type
Bool
Default
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.

input_format_csv_try_infer_strings_from_quoted_tuples

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.61A new way of how interpret tuples in CSV format was added.
24.31A 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

Type
Bool
Default
1

Use some tweaks and heuristics to infer schema in CSV format

input_format_csv_use_default_on_bad_values

Type
Bool
Default
0

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

input_format_custom_allow_variable_number_of_columns

Type
Bool
Default
0

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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.11Detect header in CustomSeparated format by default

Automatically detect header with names and types in CustomSeparated format

input_format_custom_skip_trailing_empty_lines

Type
Bool
Default
0

Skip trailing empty lines in CustomSeparated format

input_format_defaults_for_omitted_fields

Type
Bool
Default
1
Version history
VersionDefault valueComment
19.121Enable 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.50Disable type-defaults for omitted fields when needed

Force initialize omitted fields with null values

input_format_geojson_unsupported_geometry_handling

Type
GeoJSONUnsupportedGeometryHandling
Default
throw
Version history
VersionDefault valueComment
26.6throwNew 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 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.

input_format_hive_text_allow_variable_number_of_columns

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.41Ignore 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

Type
Char
Default


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

input_format_hive_text_fields_delimiter

Type
Char
Default


Delimiter between fields in Hive Text File

input_format_hive_text_map_keys_delimiter

Type
Char
Default


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

input_format_import_nested_json

Type
Bool
Default
0

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

Supported formats:

Possible values:

  • 0 — Disabled.
  • 1 — Enabled.

See also:

input_format_ipv4_default_on_conversion_error

Type
Bool
Default
0

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

Disabled by default.

input_format_ipv6_default_on_conversion_error

Type
Bool
Default
0

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

Type
Bool
Default
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.

input_format_json_defaults_for_missing_elements_in_named_tuple

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.11Allow 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.90Added 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.31Improve parsing JSON objects as named tuples

Ignore unknown keys in json object for named tuples.

Enabled by default.

input_format_json_ignore_unnecessary_fields

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.41Ignore 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.81Infer 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.91Allow 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.70New setting

Deserialize maps columns as JSON arrays of tuples.

Disabled by default.

input_format_json_max_depth

Type
UInt64
Default
1000
Version history
VersionDefault valueComment
24.81000It 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

Type
UInt64
Default
536870912
Version history
VersionDefault valueComment
26.8536870912New 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

Type
UInt64
Default
0
Version history
VersionDefault valueComment
26.80New 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

Type
Bool
Default
1

Parse named tuple columns as JSON objects.

Enabled by default.

input_format_json_read_arrays_as_strings

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.91Allow 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

Type
Bool
Default
1

Allow parsing bools as numbers in JSON input formats.

Enabled by default.

input_format_json_read_bools_as_strings

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.11Allow 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.91Allow 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.11Enable 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.41Allow 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.91Try 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
23.90Don'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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.30Allow 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

Type
Bool
Default
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.

input_format_max_block_size_bytes

Type
UInt64
Default
0
Version history
VersionDefault valueComment
25.50New 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

Type
UInt64
Default
0
Version history
VersionDefault valueComment
26.20New 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 0

input_format_max_bytes_to_read_for_schema_inference

Type
UInt64
Default
33554432

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

input_format_max_rows_to_read_for_schema_inference

Type
UInt64
Default
25000

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

input_format_msgpack_number_of_columns

Type
UInt64
Default
0

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

input_format_mysql_dump_map_column_names

Type
Bool
Default
1

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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.31Allow types conversion in Native input forma

Allow data types conversion in Native input format

input_format_native_decode_types_in_binary_format

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.70Added 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
21.11Allow 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 NULL into a not nullable column causes an exception.
  • 1 — NULL fields are initialized with default column values.

input_format_orc_allow_missing_columns

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.121Allow missing columns in ORC files by default

Allow missing columns while reading ORC input formats

input_format_orc_case_insensitive_column_matching

Type
Bool
Default
0

Ignore case when matching ORC columns with CH columns.

input_format_orc_dictionary_as_low_cardinality

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.101Treat 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

Type
Bool
Default
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.

input_format_orc_reader_time_zone_name

Type
String
Default
GMT
Version history
VersionDefault valueComment
24.7GMTThe 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

Type
Int64
Default
100000

Batch size when reading ORC stripes.

input_format_orc_skip_columns_with_unsupported_types_in_schema_inference

Type
Bool
Default
0

Skip columns with unsupported types while schema inference for format ORC

input_format_parallel_parsing

Type
Bool
Default
1

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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.51A 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.121Allow missing columns in Parquet files by default

Allow missing columns while reading Parquet input formats

input_format_parquet_bloom_filter_push_down

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.51When reading Parquet files, skip whole row groups based on the WHERE/PREWHERE expressions and bloom filter in the Parquet metadata.
24.100When 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

Type
Bool
Default
0

Ignore case when matching Parquet columns with CH columns.

input_format_parquet_dictionary_filter_push_down

Type
UInt64
Default
1048576
Version history
VersionDefault valueComment
26.81048576New 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.61When 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
24.101Enable 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

Type
Bool
Default
1

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

Type
UInt64
Default
8192

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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.111Use 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

Type
NonZeroUInt64
Default
65409
Version history
VersionDefault valueComment
24.665409Increase block size for parquet reader.

Max block size for parquet reader.

input_format_parquet_memory_high_watermark

Type
UInt64
Default
4294967296
Version history
VersionDefault valueComment
25.84294967296New 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

Type
UInt64
Default
2097152
Version history
VersionDefault valueComment
25.82097152New 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.81New 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

Type
UInt64
Default
16744704
Version history
VersionDefault valueComment
24.616744704Average block bytes output by parquet reader.

Average block bytes output by parquet reader

input_format_parquet_preserve_order

Type
Bool
Default
0
Version history
VersionDefault valueComment
23.50Allow 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

Type
Bool
Default
0

Skip columns with unsupported types while schema inference for format Parquet

input_format_parquet_spatial_filter_push_down

Type
Bool
Default
1
Version history
VersionDefault valueComment
26.81New 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.81New 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
25.111New setting.

Verify page checksums when reading parquet files.

input_format_protobuf_flatten_google_wrappers

Type
Bool
Default
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

input_format_protobuf_oneof_presence

Type
Bool
Default
0
Version history
VersionDefault valueComment
25.90New 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

Type
Bool
Default
0

Skip fields with unsupported types while schema inference for format Protobuf

input_format_read_datetime_number_as_raw_value

Type
Bool
Default
0
Version history
VersionDefault valueComment
26.80From 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
22.61Optimize 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:

Possible values:

  • 0 — Disabled.
  • 1 — Enabled.

input_format_try_infer_dates

Type
Bool
Default
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.

input_format_try_infer_datetimes

Type
Bool
Default
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.

input_format_try_infer_datetimes_only_datetime64

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.80Allow 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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.20Don'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

Type
Bool
Default
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.

input_format_try_infer_variants

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.90Try 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

Type
Bool
Default
0

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

Type
Bool
Default
0
Version history
VersionDefault valueComment
24.50Enables 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

Type
Bool
Default
1
Version history
VersionDefault valueComment
23.11Detect header in TSV format by default

Automatically detect header with names and types in TSV format

input_format_tsv_empty_as_default

Type
Bool
Default
0

Treat empty fields in TSV input as default values.

input_format_tsv_enum_as_number

Type
Bool
Default
0

Treat inserted enum values in TSV formats as enum indices.

input_format_tsv_skip_first_lines

Type
UInt64
Default
0

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

input_format_tsv_skip_trailing_empty_lines

Type
Bool
Default
0

Skip trailing empty lines in TSV format

input_format_tsv_use_best_effort_in_schema_inference

Type
Bool
Default
1

Use some tweaks and heuristics to infer schema in TSV format

input_format_values_accurate_types_of_literals

Type
Bool
Default
1

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

Type
Bool
Default
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.

input_format_values_interpret_expressions

Type
Bool
Default
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.

input_format_with_names_use_header

Type
Bool
Default
1
Version history
VersionDefault valueComment
20.51Enable 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:

Possible values:

  • 0 — Disabled.
  • 1 — Enabled.

input_format_with_types_use_header

Type
Bool
Default
1

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

Supported formats:

Possible values:

  • 0 — Disabled.
  • 1 — Enabled.
Navigation