Skip to main content
Skip to main content

Format Settings For JSON

On this page you can find format settings common to all JSON formats.

SettingDescriptionDefaultNote
input_format_import_nested_jsonMap nested JSON data to nested tables (it works for JSONEachRow format).false
input_format_json_read_bools_as_numbersAllow to parse bools as numbers in JSON input formats.true
input_format_json_read_bools_as_stringsAllow to parse bools as strings in JSON input formats.true
input_format_json_read_numbers_as_stringsAllow to parse numbers as strings in JSON input formats.true
input_format_json_read_arrays_as_stringsAllow to parse JSON arrays as strings in JSON input formats.true
input_format_json_read_objects_as_stringsAllow to parse JSON objects as strings in JSON input formats.true
input_format_json_named_tuples_as_objectsParse named tuple columns as JSON objects.true
input_format_json_try_infer_numbers_from_stringsTry to infer numbers from string fields while schema inference.false
input_format_json_try_infer_named_tuples_from_objectsTry to infer named tuple from JSON objects during schema inference.true
input_format_json_infer_incomplete_types_as_stringsUse type String for keys that contains only Nulls or empty objects/arrays during schema inference in JSON input formats.true
input_format_json_defaults_for_missing_elements_in_named_tupleInsert default values for missing elements in JSON object while parsing named tuple.true
input_format_json_ignore_unknown_keys_in_named_tupleIgnore unknown keys in json object for named tuples.false
input_format_json_compact_allow_variable_number_of_columnsAllow variable number of columns in JSONCompact/JSONCompactEachRow format, ignore extra columns and use default values on missing columns.false
input_format_json_throw_on_bad_escape_sequenceThrow an exception if JSON string contains bad escape sequence. If disabled, bad escape sequences will remain as is in the data.true
input_format_json_empty_as_defaultTreat empty fields in JSON input as default values.falseFor complex default expressions input_format_defaults_for_omitted_fields must be enabled too.
output_format_json_quote_64bit_integersControls quoting of 64-bit integers in JSON output format.true
output_format_json_quote_64bit_floatsControls quoting of 64-bit floats in JSON output format.false
output_format_json_quote_denormalsEnables '+nan', '-nan', '+inf', '-inf' outputs in JSON output format.false
output_format_json_quote_decimalsControls quoting of decimals in JSON output format.false
output_format_json_escape_forward_slashesControls escaping forward slashes for string outputs in JSON output format.true
output_format_json_named_tuples_as_objectsSerialize named tuple columns as JSON objects.true
output_format_json_array_of_rowsOutput a JSON array of all rows in JSONEachRow(Compact) format.false
output_format_json_validate_utf8Enables validation of UTF-8 sequences in JSON output formatsfalseNote that it doesn't impact formats JSON/JSONCompact/JSONColumnsWithMetadata, they always validate utf8.