| 设置 | 说明 | 默认值 | 注释 |
|---|---|---|---|
input_format_import_nested_json | 将嵌套的 JSON 数据映射到嵌套表 (适用于 JSONEachRow 格式) 。 | false | |
input_format_json_read_bools_as_numbers | 允许在 JSON 输入格式中将布尔值解析为数值。 | true | |
input_format_json_read_bools_as_strings | 允许在 JSON 输入格式中将布尔值按 String 解析。 | true | |
input_format_json_read_numbers_as_strings | 允许在 JSON 输入格式中将数值按 String 解析。 | true | |
input_format_json_read_arrays_as_strings | 允许在 JSON 输入格式中将 JSON 数组按 String 解析。 | true | |
input_format_json_read_objects_as_strings | 允许在 JSON input formats 中将 JSON 对象解析为字符串。 | true | |
input_format_json_named_tuples_as_objects | 将命名元组列解析为 JSON 对象。 | true | |
input_format_json_try_infer_numbers_from_strings | 在进行 schema inference 时,尝试从字符串字段中推断数值。 | false | |
input_format_json_try_infer_named_tuples_from_objects | 在 schema 推断期间,尝试从 JSON objects 中推断命名元组。 | true | |
input_format_json_infer_incomplete_types_as_strings | 在 JSON input formats 的 schema 推断期间,对于仅包含 NULL 或空对象/数组的键,使用 String 类型。 | true | |
input_format_json_defaults_for_missing_elements_in_named_tuple | 在解析命名元组时,为 JSON object 中缺失的元素插入默认值。 | true | |
input_format_json_ignore_unknown_keys_in_named_tuple | 在命名元组的 JSON object 中忽略未知键。 | false | |
input_format_json_compact_allow_variable_number_of_columns | 在 JSONCompact/JSONCompactEachRow 格式中允许列数可变,忽略多余列,并对缺失列使用默认值。 | false | |
input_format_json_throw_on_bad_escape_sequence | 如果 JSON string 包含错误的转义序列,则抛出异常。若禁用,错误的转义序列将按原样保留在数据中。 | true | |
input_format_json_empty_as_default | 将 JSON 输入中的空字段视为默认值。 | false | 对于复杂的默认表达式,还必须启用 input_format_defaults_for_omitted_fields。 |
output_format_json_quote_64bit_integers | 控制在 JSON 输出格式中是否将 64 位整数加引号。 | true | |
output_format_json_quote_64bit_floats | 控制在 JSON 输出格式中是否将 64 位浮点数加引号。 | false | |
output_format_json_quote_denormals | 在 JSON 输出格式中启用 ‘+nan’、‘-nan’、‘+inf’ 和 ‘-inf’ 的输出。 | false | |
output_format_json_quote_decimals | 控制在 JSON 输出格式中是否为 Decimal 值加引号。 | false | |
output_format_json_escape_forward_slashes | 控制在 JSON 输出格式中是否对字符串输出中的正斜杠进行转义。 | true | |
output_format_json_named_tuples_as_objects | 将命名元组列序列化为 JSON 对象。 | true | |
output_format_json_array_of_rows | 以 JSONEachRow(Compact) 格式输出由所有行组成的 JSON 数组。 | false | |
output_format_json_validate_utf8 | 启用对 JSON 输出格式中 UTF-8 序列的校验 | false | 请注意,这不会影响 JSON/JSONCompact/JSONColumnsWithMetadata 格式;它们始终都会验证 UTF-8。 |
JSON 格式设置
JSON 格式设置列表
本页列出了所有 JSON 格式通用的格式设置。
最后修改于 2026年8月14日